Merge "Fix callback test to only verify registration" into udc-dev
diff --git a/audio/aidl/Android.bp b/audio/aidl/Android.bp
index e6b0cee..515787e 100644
--- a/audio/aidl/Android.bp
+++ b/audio/aidl/Android.bp
@@ -36,12 +36,13 @@
"android.hardware.audio_defaults",
],
srcs: [
+ "android/hardware/audio/common/AudioOffloadMetadata.aidl",
"android/hardware/audio/common/PlaybackTrackMetadata.aidl",
"android/hardware/audio/common/RecordTrackMetadata.aidl",
"android/hardware/audio/common/SinkMetadata.aidl",
"android/hardware/audio/common/SourceMetadata.aidl",
],
- frozen: true,
+ frozen: false,
imports: [
"android.media.audio.common.types-V2",
],
@@ -77,7 +78,7 @@
}
// Note: This should always be one version ahead of the last frozen version
-latest_android_hardware_audio_common = "android.hardware.audio.common-V1"
+latest_android_hardware_audio_common = "android.hardware.audio.common-V2"
// Modules that depend on android.hardware.audio.common directly can include
// the following cc_defaults to avoid explicitly managing dependency versions
@@ -112,6 +113,8 @@
"android/hardware/audio/core/AudioPatch.aidl",
"android/hardware/audio/core/AudioRoute.aidl",
"android/hardware/audio/core/IBluetooth.aidl",
+ "android/hardware/audio/core/IBluetoothA2dp.aidl",
+ "android/hardware/audio/core/IBluetoothLe.aidl",
"android/hardware/audio/core/IConfig.aidl",
"android/hardware/audio/core/IModule.aidl",
"android/hardware/audio/core/IStreamCallback.aidl",
@@ -129,7 +132,7 @@
imports: [
"android.hardware.common-V2",
"android.hardware.common.fmq-V1",
- "android.hardware.audio.common-V1",
+ "android.hardware.audio.common-V2",
"android.hardware.audio.core.sounddose-V1",
"android.hardware.audio.effect-V1",
"android.media.audio.common.types-V2",
@@ -253,7 +256,7 @@
imports: [
"android.hardware.common-V2",
"android.hardware.common.fmq-V1",
- "android.hardware.audio.common-V1",
+ "android.hardware.audio.common-V2",
"android.media.audio.common.types-V2",
],
backend: {
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/audio/aidl/aidl_api/android.hardware.audio.common/current/android/hardware/audio/common/AudioOffloadMetadata.aidl
similarity index 85%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to audio/aidl/aidl_api/android.hardware.audio.common/current/android/hardware/audio/common/AudioOffloadMetadata.aidl
index 758b251..000504b 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.common/current/android/hardware/audio/common/AudioOffloadMetadata.aidl
@@ -31,10 +31,12 @@
// 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.audio.common;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioOffloadMetadata {
+ int sampleRate;
+ android.media.audio.common.AudioChannelLayout channelMask;
+ int averageBitRatePerSecond;
+ int delayFrames;
+ int paddingFrames;
}
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/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IBluetoothA2dp.aidl
similarity index 85%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IBluetoothA2dp.aidl
index 758b251..0f4c46d 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IBluetoothA2dp.aidl
@@ -31,10 +31,11 @@
// 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.audio.core;
+@VintfStability
+interface IBluetoothA2dp {
+ boolean isEnabled();
+ void setEnabled(boolean enabled);
+ boolean supportsOffloadReconfiguration();
+ void reconfigureOffload(in android.hardware.audio.core.VendorParameter[] parameters);
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IBluetoothLe.aidl
similarity index 85%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IBluetoothLe.aidl
index 758b251..2068daf 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IBluetoothLe.aidl
@@ -31,10 +31,11 @@
// 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.audio.core;
+@VintfStability
+interface IBluetoothLe {
+ boolean isEnabled();
+ void setEnabled(boolean enabled);
+ boolean supportsOffloadReconfiguration();
+ void reconfigureOffload(in android.hardware.audio.core.VendorParameter[] parameters);
}
diff --git a/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IModule.aidl b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IModule.aidl
index 1eafdab..e14e9c0 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IModule.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IModule.aidl
@@ -37,6 +37,8 @@
void setModuleDebug(in android.hardware.audio.core.ModuleDebug debug);
@nullable android.hardware.audio.core.ITelephony getTelephony();
@nullable android.hardware.audio.core.IBluetooth getBluetooth();
+ @nullable android.hardware.audio.core.IBluetoothA2dp getBluetoothA2dp();
+ @nullable android.hardware.audio.core.IBluetoothLe getBluetoothLe();
android.media.audio.common.AudioPort connectExternalDevice(in android.media.audio.common.AudioPort templateIdAndAdditionalData);
void disconnectExternalDevice(int portId);
android.hardware.audio.core.AudioPatch[] getAudioPatches();
diff --git a/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamCommon.aidl b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamCommon.aidl
index f0bf100..65a2ee4 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamCommon.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamCommon.aidl
@@ -35,6 +35,7 @@
@VintfStability
interface IStreamCommon {
void close();
+ void prepareToClose();
void updateHwAvSyncId(int hwAvSyncId);
android.hardware.audio.core.VendorParameter[] getVendorParameters(in @utf8InCpp String[] ids);
void setVendorParameters(in android.hardware.audio.core.VendorParameter[] parameters, boolean async);
diff --git a/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamOut.aidl b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamOut.aidl
index 46acc11..ec3078e 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamOut.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.core/current/android/hardware/audio/core/IStreamOut.aidl
@@ -36,6 +36,7 @@
interface IStreamOut {
android.hardware.audio.core.IStreamCommon getStreamCommon();
void updateMetadata(in android.hardware.audio.common.SourceMetadata sourceMetadata);
+ void updateOffloadMetadata(in android.hardware.audio.common.AudioOffloadMetadata offloadMetadata);
float[] getHwVolume();
void setHwVolume(in float[] channelVolumes);
float getAudioDescriptionMixLevel();
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AcousticEchoCanceler.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AcousticEchoCanceler.aidl
index 1ec7dad..16367c0 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AcousticEchoCanceler.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AcousticEchoCanceler.aidl
@@ -39,7 +39,7 @@
boolean mobileMode;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.AcousticEchoCanceler.Tag commonTag;
}
}
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV1.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV1.aidl
index 57d4418..e69e2bd 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV1.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV1.aidl
@@ -40,7 +40,7 @@
boolean enableLimiter;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.AutomaticGainControlV1.Tag commonTag;
}
}
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV2.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV2.aidl
index bdb481c..46ffcaf 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV2.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/AutomaticGainControlV2.aidl
@@ -40,7 +40,7 @@
int saturationMarginMb;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.AutomaticGainControlV2.Tag commonTag;
}
@Backing(type="int") @VintfStability
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/BassBoost.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/BassBoost.aidl
index d09fe54..c248ce8 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/BassBoost.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/BassBoost.aidl
@@ -38,7 +38,7 @@
int strengthPm;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.BassBoost.Tag commonTag;
}
}
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/Downmix.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Downmix.aidl
index 45a1f28..ce0a7df 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Downmix.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Downmix.aidl
@@ -38,7 +38,7 @@
android.hardware.audio.effect.Downmix.Type type;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.Downmix.Tag commonTag;
}
@VintfStability
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/DynamicsProcessing.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/DynamicsProcessing.aidl
index 3e20e33..04f627d 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/DynamicsProcessing.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/DynamicsProcessing.aidl
@@ -34,7 +34,7 @@
package android.hardware.audio.effect;
@VintfStability
union DynamicsProcessing {
- android.hardware.audio.effect.VendorExtension vendorExtension;
+ android.hardware.audio.effect.VendorExtension vendor;
android.hardware.audio.effect.DynamicsProcessing.EngineArchitecture engineArchitecture;
android.hardware.audio.effect.DynamicsProcessing.ChannelConfig[] preEq;
android.hardware.audio.effect.DynamicsProcessing.ChannelConfig[] postEq;
@@ -46,7 +46,7 @@
android.hardware.audio.effect.DynamicsProcessing.InputGain[] inputGain;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.DynamicsProcessing.Tag commonTag;
}
enum ResolutionPreference {
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/EnvironmentalReverb.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/EnvironmentalReverb.aidl
index a193102..00b7d1a 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/EnvironmentalReverb.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/EnvironmentalReverb.aidl
@@ -39,6 +39,8 @@
int roomHfLevelMb;
int decayTimeMs;
int decayHfRatioPm;
+ int reflectionsLevelMb;
+ int reflectionsDelayMs;
int levelMb;
int delayMs;
int diffusionPm;
@@ -46,7 +48,7 @@
boolean bypass;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.EnvironmentalReverb.Tag commonTag;
}
}
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Equalizer.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Equalizer.aidl
index 3e3539f..80f7c7e 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Equalizer.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Equalizer.aidl
@@ -34,7 +34,7 @@
package android.hardware.audio.effect;
@VintfStability
union Equalizer {
- android.hardware.audio.effect.VendorExtension vendorExtension;
+ android.hardware.audio.effect.VendorExtension vendor;
android.hardware.audio.effect.Equalizer.BandLevel[] bandLevels;
int preset;
int[] centerFreqMh;
@@ -42,7 +42,7 @@
android.hardware.audio.effect.Equalizer.Preset[] presets;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.Equalizer.Tag commonTag;
}
@VintfStability
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/HapticGenerator.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/HapticGenerator.aidl
index a7dc265..8addab7 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/HapticGenerator.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/HapticGenerator.aidl
@@ -34,12 +34,12 @@
package android.hardware.audio.effect;
@VintfStability
union HapticGenerator {
- android.hardware.audio.effect.VendorExtension vendorExtension;
+ android.hardware.audio.effect.VendorExtension vendor;
android.hardware.audio.effect.HapticGenerator.HapticScale[] hapticScales;
android.hardware.audio.effect.HapticGenerator.VibratorInformation vibratorInfo;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.HapticGenerator.Tag commonTag;
}
@Backing(type="int") @VintfStability
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/LoudnessEnhancer.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/LoudnessEnhancer.aidl
index 774f45f..fc276d6 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/LoudnessEnhancer.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/LoudnessEnhancer.aidl
@@ -38,7 +38,7 @@
int gainMb;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.LoudnessEnhancer.Tag commonTag;
}
}
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/NoiseSuppression.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/NoiseSuppression.aidl
index f1a3449..7f30fe2 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/NoiseSuppression.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/NoiseSuppression.aidl
@@ -39,7 +39,7 @@
android.hardware.audio.effect.NoiseSuppression.Type type;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.NoiseSuppression.Tag commonTag;
}
@Backing(type="int") @VintfStability
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 14aa1e8..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,11 +38,12 @@
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
union Id {
- int vendorEffectTag;
+ android.hardware.audio.effect.VendorExtension vendorEffectTag;
android.hardware.audio.effect.AcousticEchoCanceler.Id acousticEchoCancelerTag;
android.hardware.audio.effect.AutomaticGainControlV1.Id automaticGainControlV1Tag;
android.hardware.audio.effect.AutomaticGainControlV2.Id automaticGainControlV2Tag;
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/PresetReverb.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/PresetReverb.aidl
index 148f79d..26d96b5 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/PresetReverb.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/PresetReverb.aidl
@@ -49,7 +49,7 @@
}
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.PresetReverb.Tag commonTag;
}
}
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Virtualizer.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Virtualizer.aidl
index e9611e4..6092b14 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Virtualizer.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Virtualizer.aidl
@@ -40,7 +40,7 @@
android.media.audio.common.AudioDeviceDescription device;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.Virtualizer.Tag commonTag;
android.hardware.audio.effect.Virtualizer.SpeakerAnglesPayload speakerAnglesPayload;
}
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Visualizer.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Visualizer.aidl
index d1b1b3e..7d319da 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Visualizer.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Visualizer.aidl
@@ -44,7 +44,7 @@
android.hardware.audio.effect.Visualizer.MeasurementMode measurementMode;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.Visualizer.Tag commonTag;
}
@VintfStability
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Volume.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Volume.aidl
index c2b2df7..8227118 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Volume.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Volume.aidl
@@ -39,7 +39,7 @@
boolean mute;
@VintfStability
union Id {
- int vendorExtensionTag;
+ android.hardware.audio.effect.VendorExtension vendorExtensionTag;
android.hardware.audio.effect.Volume.Tag commonTag;
}
}
diff --git a/audio/aidl/android/hardware/audio/common/AudioOffloadMetadata.aidl b/audio/aidl/android/hardware/audio/common/AudioOffloadMetadata.aidl
new file mode 100644
index 0000000..5881658
--- /dev/null
+++ b/audio/aidl/android/hardware/audio/common/AudioOffloadMetadata.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.audio.common;
+
+import android.media.audio.common.AudioChannelLayout;
+
+/**
+ * Dynamic metadata for offloaded compressed audio.
+ * For static metadata, see android.media.audio.common.AudioOffloadInfo.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioOffloadMetadata {
+ int sampleRate;
+ AudioChannelLayout channelMask;
+ /** Average bit rate in bits per second. */
+ int averageBitRatePerSecond;
+ /**
+ * Number of frames to be ignored at the beginning of the stream.
+ * The value must be non-negative. A value of 0 indicates no delay
+ * has to be applied.
+ */
+ int delayFrames;
+ /**
+ * Number of frames to be ignored at the end of the stream.
+ * The value must be non-negative. A value of 0 indicates no padding
+ * has to be applied.
+ */
+ int paddingFrames;
+}
diff --git a/audio/aidl/android/hardware/audio/core/IBluetooth.aidl b/audio/aidl/android/hardware/audio/core/IBluetooth.aidl
index 21ac8e2..7fa2e24 100644
--- a/audio/aidl/android/hardware/audio/core/IBluetooth.aidl
+++ b/audio/aidl/android/hardware/audio/core/IBluetooth.aidl
@@ -25,6 +25,9 @@
* and the SCO Link. This interface is optional to implement and provide by the
* vendor. It needs to be provided only if the device actually supports BT SCO
* or HFP.
+ *
+ * Each of IBluetooth* interfaces is independent of each other. The HAL module
+ * can provide any combination of them.
*/
@VintfStability
interface IBluetooth {
diff --git a/audio/aidl/android/hardware/audio/core/IBluetoothA2dp.aidl b/audio/aidl/android/hardware/audio/core/IBluetoothA2dp.aidl
new file mode 100644
index 0000000..a690ca4
--- /dev/null
+++ b/audio/aidl/android/hardware/audio/core/IBluetoothA2dp.aidl
@@ -0,0 +1,83 @@
+/*
+ * 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.audio.core;
+
+import android.hardware.audio.core.VendorParameter;
+
+/**
+ * An instance of IBluetoothA2dp manages settings for the A2DP (Advanced Audio
+ * Distribution Profile) profiles. This interface is optional to implement by
+ * the vendor. It needs to be provided only if the device actually supports BT
+ * A2DP.
+ *
+ * Each of IBluetooth* interfaces is independent of each other. The HAL module
+ * can provide any combination of them.
+ */
+@VintfStability
+interface IBluetoothA2dp {
+ /**
+ * Whether BT A2DP is enabled.
+ *
+ * Returns the current state of A2DP support. The client might need to
+ * disable (suspend) A2DP when another profile (for example, SCO) is
+ * activated.
+ *
+ * @return Whether BT A2DP is enabled.
+ */
+ boolean isEnabled();
+
+ /**
+ * Enable or disable A2DP.
+ *
+ * Sets the current state of A2DP support. The client might need to
+ * disable (suspend) A2DP when another profile (for example, SCO) is
+ * activated.
+ *
+ * @param enabled Whether BT A2DP must be enabled or suspended.
+ * @throws EX_ILLEGAL_STATE If there was an error performing the operation.
+ */
+ void setEnabled(boolean enabled);
+
+ /**
+ * Indicates whether the module supports reconfiguration of offloaded codecs.
+ *
+ * Offloaded codec implementations may need to be reconfigured when the
+ * active A2DP device changes. This method indicates whether the HAL module
+ * supports the reconfiguration event. The result returned from this method
+ * must not change over time.
+ *
+ * @return Whether reconfiguration offload of offloaded codecs is supported.
+ */
+ boolean supportsOffloadReconfiguration();
+
+ /**
+ * Instructs the HAL module to reconfigure offloaded codec.
+ *
+ * Offloaded codec implementations may need to be reconfigured when the
+ * active A2DP device changes. This method is a notification for the HAL
+ * module to commence reconfiguration.
+ *
+ * Note that 'EX_UNSUPPORTED_OPERATION' must be thrown if and only if
+ * 'supportsOffloadReconfiguration' returns 'false'.
+ *
+ * @param parameter Optional vendor-specific parameters, can be left empty.
+ * @throws EX_ILLEGAL_STATE If there was an error performing the operation,
+ * or the operation can not be commenced in the current state.
+ * @throws EX_UNSUPPORTED_OPERATION If the module does not support codec reconfiguration.
+ */
+ void reconfigureOffload(in VendorParameter[] parameters);
+}
diff --git a/audio/aidl/android/hardware/audio/core/IBluetoothLe.aidl b/audio/aidl/android/hardware/audio/core/IBluetoothLe.aidl
new file mode 100644
index 0000000..444ff68
--- /dev/null
+++ b/audio/aidl/android/hardware/audio/core/IBluetoothLe.aidl
@@ -0,0 +1,82 @@
+/*
+ * 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.audio.core;
+
+import android.hardware.audio.core.VendorParameter;
+
+/**
+ * An instance of IBluetoothLe manages settings for the LE (Low Energy)
+ * profiles. This interface is optional to implement by the vendor. It needs to
+ * be provided only if the device actually supports BT LE.
+ *
+ * Each of IBluetooth* interfaces is independent of each other. The HAL module
+ * can provide any combination of them.
+ */
+@VintfStability
+interface IBluetoothLe {
+ /**
+ * Whether BT LE is enabled.
+ *
+ * Returns the current state of LE support. The client might need to
+ * disable (suspend) LE when another profile (for example, SCO) is
+ * activated.
+ *
+ * @return Whether BT LE is enabled.
+ */
+ boolean isEnabled();
+
+ /**
+ * Enable or disable LE.
+ *
+ * Sets the current state of LE support. The client might need to
+ * disable (suspend) LE when another Bluetooth profile (for example, SCO) is
+ * activated.
+ *
+ * @param enabled Whether BT LE must be enabled or suspended.
+ * @throws EX_ILLEGAL_STATE If there was an error performing the operation.
+ */
+ void setEnabled(boolean enabled);
+
+ /**
+ * Indicates whether the module supports reconfiguration of offloaded codecs.
+ *
+ * Offloaded codec implementations may need to be reconfigured when the
+ * active LE device changes. This method indicates whether the HAL module
+ * supports the reconfiguration event. The result returned from this method
+ * must not change over time.
+ *
+ * @return Whether reconfiguration offload of offloaded codecs is supported.
+ */
+ boolean supportsOffloadReconfiguration();
+
+ /**
+ * Instructs the HAL module to reconfigure offloaded codec.
+ *
+ * Offloaded codec implementations may need to be reconfigured when the
+ * active LE device changes. This method is a notification for the HAL
+ * module to commence reconfiguration.
+ *
+ * Note that 'EX_UNSUPPORTED_OPERATION' must be thrown if and only if
+ * 'supportsOffloadReconfiguration' returns 'false'.
+ *
+ * @param parameter Optional vendor-specific parameters, can be left empty.
+ * @throws EX_ILLEGAL_STATE If there was an error performing the operation,
+ * or the operation can not be commenced in the current state.
+ * @throws EX_UNSUPPORTED_OPERATION If the module does not support codec reconfiguration.
+ */
+ void reconfigureOffload(in VendorParameter[] parameters);
+}
diff --git a/audio/aidl/android/hardware/audio/core/IModule.aidl b/audio/aidl/android/hardware/audio/core/IModule.aidl
index edfb9f2..7830501 100644
--- a/audio/aidl/android/hardware/audio/core/IModule.aidl
+++ b/audio/aidl/android/hardware/audio/core/IModule.aidl
@@ -21,6 +21,8 @@
import android.hardware.audio.core.AudioPatch;
import android.hardware.audio.core.AudioRoute;
import android.hardware.audio.core.IBluetooth;
+import android.hardware.audio.core.IBluetoothA2dp;
+import android.hardware.audio.core.IBluetoothLe;
import android.hardware.audio.core.IStreamCallback;
import android.hardware.audio.core.IStreamIn;
import android.hardware.audio.core.IStreamOut;
@@ -103,6 +105,34 @@
@nullable IBluetooth getBluetooth();
/**
+ * Retrieve the interface to control Bluetooth A2DP.
+ *
+ * If the HAL module supports A2DP Profile functionality for Bluetooth, it
+ * must return an instance of the IBluetoothA2dp interface. The same
+ * instance must be returned during the lifetime of the HAL module. If the
+ * HAL module does not support BT A2DP, a null must be returned, without
+ * throwing any errors.
+ *
+ * @return An instance of the IBluetoothA2dp interface implementation.
+ * @throws EX_ILLEGAL_STATE If there was an error creating an instance.
+ */
+ @nullable IBluetoothA2dp getBluetoothA2dp();
+
+ /**
+ * Retrieve the interface to control Bluetooth LE.
+ *
+ * If the HAL module supports LE Profile functionality for Bluetooth, it
+ * must return an instance of the IBluetoothLe interface. The same
+ * instance must be returned during the lifetime of the HAL module. If the
+ * HAL module does not support BT LE, a null must be returned, without
+ * throwing any errors.
+ *
+ * @return An instance of the IBluetoothLe interface implementation.
+ * @throws EX_ILLEGAL_STATE If there was an error creating an instance.
+ */
+ @nullable IBluetoothLe getBluetoothLe();
+
+ /**
* Set a device port of an external device into connected state.
*
* This method is used to inform the HAL module that an external device has
@@ -596,6 +626,7 @@
* @param mute Whether the output from the module is muted.
* @throws EX_UNSUPPORTED_OPERATION If muting of combined output
* is not supported by the module.
+ * @throws EX_ILLEGAL_STATE If any error happens while muting of combined output.
*/
void setMasterMute(boolean mute);
@@ -627,6 +658,8 @@
* accepted range.
* @throws EX_UNSUPPORTED_OPERATION If attenuation of combined output
* is not supported by the module.
+ * @throws EX_ILLEGAL_STATE If any error happens while updating attenuation of
+ combined output.
*/
void setMasterVolume(float volume);
@@ -824,7 +857,7 @@
AudioMMapPolicyInfo[] getMmapPolicyInfos(AudioMMapPolicyType mmapPolicyType);
/**
- * Indicates if this module supports variable latency control for instance
+ * Indicates if this module supports variable latency control, for instance,
* over Bluetooth A2DP or LE Audio links.
*
* If supported, all instances of IStreamOut interface returned by this module must
diff --git a/audio/aidl/android/hardware/audio/core/IStreamCommon.aidl b/audio/aidl/android/hardware/audio/core/IStreamCommon.aidl
index 533ef67..543d9e2 100644
--- a/audio/aidl/android/hardware/audio/core/IStreamCommon.aidl
+++ b/audio/aidl/android/hardware/audio/core/IStreamCommon.aidl
@@ -44,6 +44,33 @@
void close();
/**
+ * Notify the stream that it is about to be closed.
+ *
+ * This is a notification sent by the client to indicate that it intends to
+ * close the stream "soon" (the actual time period is unspecified). The
+ * purpose of this notification is to allow the stream implementation to
+ * unblock the I/O thread. This is useful for HAL modules that act as
+ * proxies to other subsystems, examples are "bluetooth" and "r_submix"
+ * modules. In such modules the I/O thread might get blocked on a read or
+ * write operation to the external subsystem. Thus, calling 'close' directly
+ * will stall, as it will try to send the 'Command.halReservedExit' on the
+ * I/O thread which is blocked and is not reading commands from the FMQ. The
+ * HAL implementation must initiate unblocking as a result of receiving the
+ * 'prepareToClose' notification.
+ *
+ * This operation must be handled by the HAL module in an "asynchronous"
+ * manner, returning control back as quick as possible.
+ *
+ * Since this operation does not have any effects observable from the client
+ * side, the HAL module must be able to handle multiple calls of this method
+ * without throwing any errors. The only case when this method is allowed
+ * to throw is when the stream has been closed.
+ *
+ * @throws EX_ILLEGAL_STATE If the stream is closed.
+ */
+ void prepareToClose();
+
+ /**
* Update the HW AV Sync identifier for the stream.
*
* The argument to this method must be one of the identifiers previously
diff --git a/audio/aidl/android/hardware/audio/core/IStreamOut.aidl b/audio/aidl/android/hardware/audio/core/IStreamOut.aidl
index 0e58add..f26dc1c 100644
--- a/audio/aidl/android/hardware/audio/core/IStreamOut.aidl
+++ b/audio/aidl/android/hardware/audio/core/IStreamOut.aidl
@@ -16,6 +16,7 @@
package android.hardware.audio.core;
+import android.hardware.audio.common.AudioOffloadMetadata;
import android.hardware.audio.common.SourceMetadata;
import android.hardware.audio.core.IStreamCommon;
import android.media.audio.common.AudioDualMonoMode;
@@ -48,6 +49,18 @@
*/
void updateMetadata(in SourceMetadata sourceMetadata);
+ /**
+ * Update offload metadata for a compressed stream.
+ *
+ * Updates the offload metadata initially provided at the stream creation.
+ *
+ * @param offloadMetadata Updated offload metadata.
+ * @throws EX_ILLEGAL_STATE If the stream is closed.
+ * @throws EX_ILLEGAL_ARGUMENT If the metadata contains invalid values.
+ * @throws EX_UNSUPPORTED_OPERATION If the stream is not for compressed offload.
+ */
+ void updateOffloadMetadata(in AudioOffloadMetadata offloadMetadata);
+
const int HW_VOLUME_MIN = 0;
const int HW_VOLUME_MAX = 1;
/**
@@ -85,7 +98,8 @@
* @throws EX_ILLEGAL_ARGUMENT If the number of elements in the provided
* array does not match the channel count, or
* attenuation values are out of range.
- * @throws EX_ILLEGAL_STATE If the stream is closed.
+ * @throws EX_ILLEGAL_STATE If the stream is closed or there is any error happens
+ when applying hardware volume.
* @throws EX_UNSUPPORTED_OPERATION If hardware volume control is not supported.
*/
void setHwVolume(in float[] channelVolumes);
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/AcousticEchoCanceler.aidl b/audio/aidl/android/hardware/audio/effect/AcousticEchoCanceler.aidl
index 49377d6..bf1f8a2 100644
--- a/audio/aidl/android/hardware/audio/effect/AcousticEchoCanceler.aidl
+++ b/audio/aidl/android/hardware/audio/effect/AcousticEchoCanceler.aidl
@@ -33,7 +33,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
AcousticEchoCanceler.Tag commonTag;
}
diff --git a/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV1.aidl b/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV1.aidl
index 9b2feff..e7bf99d 100644
--- a/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV1.aidl
+++ b/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV1.aidl
@@ -35,7 +35,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
AutomaticGainControlV1.Tag commonTag;
}
diff --git a/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV2.aidl b/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV2.aidl
index 836d6b8..8f2afdc 100644
--- a/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV2.aidl
+++ b/audio/aidl/android/hardware/audio/effect/AutomaticGainControlV2.aidl
@@ -36,7 +36,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
AutomaticGainControlV2.Tag commonTag;
}
diff --git a/audio/aidl/android/hardware/audio/effect/BassBoost.aidl b/audio/aidl/android/hardware/audio/effect/BassBoost.aidl
index d734825..479db96 100644
--- a/audio/aidl/android/hardware/audio/effect/BassBoost.aidl
+++ b/audio/aidl/android/hardware/audio/effect/BassBoost.aidl
@@ -32,7 +32,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
BassBoost.Tag commonTag;
}
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/Downmix.aidl b/audio/aidl/android/hardware/audio/effect/Downmix.aidl
index f90e339..90fd4c7 100644
--- a/audio/aidl/android/hardware/audio/effect/Downmix.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Downmix.aidl
@@ -31,7 +31,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
Downmix.Tag commonTag;
}
diff --git a/audio/aidl/android/hardware/audio/effect/DynamicsProcessing.aidl b/audio/aidl/android/hardware/audio/effect/DynamicsProcessing.aidl
index 486d4f4..5aea211 100644
--- a/audio/aidl/android/hardware/audio/effect/DynamicsProcessing.aidl
+++ b/audio/aidl/android/hardware/audio/effect/DynamicsProcessing.aidl
@@ -32,14 +32,14 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
DynamicsProcessing.Tag commonTag;
}
/**
* Vendor DynamicsProcessing implementation definition for additional parameters.
*/
- VendorExtension vendorExtension;
+ VendorExtension vendor;
/**
* Resolution preference definition.
diff --git a/audio/aidl/android/hardware/audio/effect/EnvironmentalReverb.aidl b/audio/aidl/android/hardware/audio/effect/EnvironmentalReverb.aidl
index a158dca..1d58e50 100644
--- a/audio/aidl/android/hardware/audio/effect/EnvironmentalReverb.aidl
+++ b/audio/aidl/android/hardware/audio/effect/EnvironmentalReverb.aidl
@@ -33,7 +33,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
EnvironmentalReverb.Tag commonTag;
}
@@ -59,6 +59,14 @@
*/
int decayHfRatioPm;
/**
+ * Reverb reflections level in millibels.
+ */
+ int reflectionsLevelMb;
+ /**
+ * Reverb reflections delay in milliseconds.
+ */
+ int reflectionsDelayMs;
+ /**
* Reverb level in millibels.
*/
int levelMb;
diff --git a/audio/aidl/android/hardware/audio/effect/Equalizer.aidl b/audio/aidl/android/hardware/audio/effect/Equalizer.aidl
index 2bce151..e727f70 100644
--- a/audio/aidl/android/hardware/audio/effect/Equalizer.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Equalizer.aidl
@@ -31,14 +31,14 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
Equalizer.Tag commonTag;
}
/**
* Vendor Equalizer implementation definition for additional parameters.
*/
- VendorExtension vendorExtension;
+ VendorExtension vendor;
/**
* Level setting for each band in millibels.
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/HapticGenerator.aidl b/audio/aidl/android/hardware/audio/effect/HapticGenerator.aidl
index a8e4564..3cc5acb 100644
--- a/audio/aidl/android/hardware/audio/effect/HapticGenerator.aidl
+++ b/audio/aidl/android/hardware/audio/effect/HapticGenerator.aidl
@@ -33,14 +33,14 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
HapticGenerator.Tag commonTag;
}
/**
* Vendor HapticGenerator implementation definition for additional parameters.
*/
- VendorExtension vendorExtension;
+ VendorExtension vendor;
@VintfStability
@Backing(type="int")
diff --git a/audio/aidl/android/hardware/audio/effect/LoudnessEnhancer.aidl b/audio/aidl/android/hardware/audio/effect/LoudnessEnhancer.aidl
index a7cbe8d..23e1e5a 100644
--- a/audio/aidl/android/hardware/audio/effect/LoudnessEnhancer.aidl
+++ b/audio/aidl/android/hardware/audio/effect/LoudnessEnhancer.aidl
@@ -32,7 +32,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
LoudnessEnhancer.Tag commonTag;
}
diff --git a/audio/aidl/android/hardware/audio/effect/NoiseSuppression.aidl b/audio/aidl/android/hardware/audio/effect/NoiseSuppression.aidl
index 6c2fb5f..c6bcc43 100644
--- a/audio/aidl/android/hardware/audio/effect/NoiseSuppression.aidl
+++ b/audio/aidl/android/hardware/audio/effect/NoiseSuppression.aidl
@@ -35,7 +35,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
NoiseSuppression.Tag commonTag;
}
diff --git a/audio/aidl/android/hardware/audio/effect/Parameter.aidl b/audio/aidl/android/hardware/audio/effect/Parameter.aidl
index 9f8874b..0954055 100644
--- a/audio/aidl/android/hardware/audio/effect/Parameter.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Parameter.aidl
@@ -66,10 +66,10 @@
@VintfStability
union Id {
/**
- * Parameter tag defined for vendor effects. Use int here so there is flexibility for vendor
- * to define different tag.
+ * Parameter tag defined for vendor effects. Use VendorExtension here so it's possible to
+ * pass customized information.
*/
- int vendorEffectTag;
+ VendorExtension vendorEffectTag;
/**
* Parameter tag defined for nested parameters. Can be used to get any parameter defined in
* nested Union structure.
@@ -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/android/hardware/audio/effect/PresetReverb.aidl b/audio/aidl/android/hardware/audio/effect/PresetReverb.aidl
index 87c78b0..a36da2c 100644
--- a/audio/aidl/android/hardware/audio/effect/PresetReverb.aidl
+++ b/audio/aidl/android/hardware/audio/effect/PresetReverb.aidl
@@ -68,7 +68,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
PresetReverb.Tag commonTag;
}
diff --git a/audio/aidl/android/hardware/audio/effect/Virtualizer.aidl b/audio/aidl/android/hardware/audio/effect/Virtualizer.aidl
index 37ea2a4..1dbb509 100644
--- a/audio/aidl/android/hardware/audio/effect/Virtualizer.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Virtualizer.aidl
@@ -34,7 +34,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
Virtualizer.Tag commonTag;
SpeakerAnglesPayload speakerAnglesPayload;
}
diff --git a/audio/aidl/android/hardware/audio/effect/Visualizer.aidl b/audio/aidl/android/hardware/audio/effect/Visualizer.aidl
index 8f2faaa..0b37546 100644
--- a/audio/aidl/android/hardware/audio/effect/Visualizer.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Visualizer.aidl
@@ -33,7 +33,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
Visualizer.Tag commonTag;
}
Id id;
diff --git a/audio/aidl/android/hardware/audio/effect/Volume.aidl b/audio/aidl/android/hardware/audio/effect/Volume.aidl
index 4a76703..15cfdd2 100644
--- a/audio/aidl/android/hardware/audio/effect/Volume.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Volume.aidl
@@ -31,7 +31,7 @@
*/
@VintfStability
union Id {
- int vendorExtensionTag;
+ VendorExtension vendorExtensionTag;
Volume.Tag commonTag;
}
diff --git a/audio/aidl/common/include/Utils.h b/audio/aidl/common/include/Utils.h
index d87bbd4..2cf862c 100644
--- a/audio/aidl/common/include/Utils.h
+++ b/audio/aidl/common/include/Utils.h
@@ -19,6 +19,7 @@
#include <algorithm>
#include <array>
#include <initializer_list>
+#include <regex>
#include <type_traits>
#include <aidl/android/media/audio/common/AudioChannelLayout.h>
@@ -29,7 +30,7 @@
#include <aidl/android/media/audio/common/AudioOutputFlags.h>
#include <aidl/android/media/audio/common/PcmType.h>
-namespace android::hardware::audio::common {
+namespace aidl::android::hardware::audio::common {
// Some values are reserved for use by the system code only.
// HALs must not accept or emit values outside from the provided list.
@@ -133,6 +134,18 @@
kValidAudioModes.end();
}
+static inline bool maybeVendorExtension(const std::string& s) {
+ // Only checks whether the string starts with the "vendor prefix".
+ static const std::string vendorPrefix = "VX_";
+ return s.size() > vendorPrefix.size() && s.substr(0, vendorPrefix.size()) == vendorPrefix;
+}
+
+static inline bool isVendorExtension(const std::string& s) {
+ // Must be the same as defined in {Playback|Record}TrackMetadata.aidl
+ static const std::regex vendorExtension("VX_[A-Z0-9]{3,}_[_A-Z0-9]+");
+ return std::regex_match(s.begin(), s.end(), vendorExtension);
+}
+
// The helper functions defined below are only applicable to the case when an enum type
// specifies zero-based bit positions, not bit masks themselves. This is why instantiation
// is restricted to certain enum types.
@@ -163,4 +176,4 @@
return result;
}
-} // namespace android::hardware::audio::common
+} // namespace aidl::android::hardware::audio::common
diff --git a/audio/aidl/common/tests/utils_tests.cpp b/audio/aidl/common/tests/utils_tests.cpp
index d7f1a5d..1b8b8df 100644
--- a/audio/aidl/common/tests/utils_tests.cpp
+++ b/audio/aidl/common/tests/utils_tests.cpp
@@ -26,13 +26,13 @@
#define LOG_TAG "Utils_Test"
#include <log/log.h>
+using aidl::android::hardware::audio::common::getChannelCount;
+using aidl::android::hardware::audio::common::getFrameSizeInBytes;
+using aidl::android::hardware::audio::common::getPcmSampleSizeInBytes;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioFormatDescription;
using aidl::android::media::audio::common::AudioFormatType;
using aidl::android::media::audio::common::PcmType;
-using android::hardware::audio::common::getChannelCount;
-using android::hardware::audio::common::getFrameSizeInBytes;
-using android::hardware::audio::common::getPcmSampleSizeInBytes;
TEST(UtilsTest, ChannelCountOddCases) {
using Tag = AudioChannelLayout::Tag;
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index 21616be..c9edae0 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -13,6 +13,7 @@
shared_libs: [
"libalsautilsv2",
"libaudioaidlcommon",
+ "libaudioutils",
"libbase",
"libbinder_ndk",
"libcutils",
@@ -54,12 +55,13 @@
],
}
-cc_library_static {
+cc_library {
name: "libaudioserviceexampleimpl",
defaults: [
"aidlaudioservice_defaults",
"latest_android_media_audio_common_types_ndk_shared",
"latest_android_hardware_audio_core_ndk_shared",
+ "latest_android_hardware_audio_core_sounddose_ndk_shared",
],
export_include_dirs: ["include"],
srcs: [
@@ -75,6 +77,7 @@
"Telephony.cpp",
"usb/ModuleUsb.cpp",
"usb/StreamUsb.cpp",
+ "usb/UsbAlsaMixerControl.cpp",
"usb/UsbAlsaUtils.cpp",
],
generated_sources: [
@@ -89,9 +92,6 @@
"audio_policy_configuration_aidl_default",
"audio_policy_engine_configuration_aidl_default",
],
- visibility: [
- ":__subpackages__",
- ],
}
cc_binary {
diff --git a/audio/aidl/default/Bluetooth.cpp b/audio/aidl/default/Bluetooth.cpp
index 38e0c21..c32b538 100644
--- a/audio/aidl/default/Bluetooth.cpp
+++ b/audio/aidl/default/Bluetooth.cpp
@@ -19,6 +19,7 @@
#include "core-impl/Bluetooth.h"
+using aidl::android::hardware::audio::core::VendorParameter;
using aidl::android::media::audio::common::Boolean;
using aidl::android::media::audio::common::Float;
using aidl::android::media::audio::common::Int;
@@ -79,4 +80,54 @@
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus BluetoothA2dp::isEnabled(bool* _aidl_return) {
+ *_aidl_return = mEnabled;
+ LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothA2dp::setEnabled(bool in_enabled) {
+ mEnabled = in_enabled;
+ LOG(DEBUG) << __func__ << ": " << mEnabled;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothA2dp::supportsOffloadReconfiguration(bool* _aidl_return) {
+ *_aidl_return = true;
+ LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothA2dp::reconfigureOffload(
+ const std::vector<::aidl::android::hardware::audio::core::VendorParameter>& in_parameters
+ __unused) {
+ LOG(DEBUG) << __func__ << ": " << ::android::internal::ToString(in_parameters);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothLe::isEnabled(bool* _aidl_return) {
+ *_aidl_return = mEnabled;
+ LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothLe::setEnabled(bool in_enabled) {
+ mEnabled = in_enabled;
+ LOG(DEBUG) << __func__ << ": " << mEnabled;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothLe::supportsOffloadReconfiguration(bool* _aidl_return) {
+ *_aidl_return = true;
+ LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothLe::reconfigureOffload(
+ const std::vector<::aidl::android::hardware::audio::core::VendorParameter>& in_parameters
+ __unused) {
+ LOG(DEBUG) << __func__ << ": " << ::android::internal::ToString(in_parameters);
+ return ndk::ScopedAStatus::ok();
+}
+
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/Configuration.cpp b/audio/aidl/default/Configuration.cpp
index a72be24..e1e1f79 100644
--- a/audio/aidl/default/Configuration.cpp
+++ b/audio/aidl/default/Configuration.cpp
@@ -25,6 +25,7 @@
#include "core-impl/Configuration.h"
+using aidl::android::hardware::audio::common::makeBitPositionFlagMask;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioDeviceDescription;
using aidl::android::media::audio::common::AudioDeviceType;
@@ -42,7 +43,6 @@
using aidl::android::media::audio::common::Int;
using aidl::android::media::audio::common::MicrophoneInfo;
using aidl::android::media::audio::common::PcmType;
-using android::hardware::audio::common::makeBitPositionFlagMask;
namespace aidl::android::hardware::audio::core::internal {
diff --git a/audio/aidl/default/EffectThread.cpp b/audio/aidl/default/EffectThread.cpp
index 024c0ea..4f8fb3c 100644
--- a/audio/aidl/default/EffectThread.cpp
+++ b/audio/aidl/default/EffectThread.cpp
@@ -34,13 +34,14 @@
};
RetCode EffectThread::createThread(std::shared_ptr<EffectContext> context, const std::string& name,
- const int priority) {
+ int priority, int sleepUs /* kSleepTimeUs */) {
if (mThread.joinable()) {
LOG(WARNING) << __func__ << " thread already created, no-op";
return RetCode::SUCCESS;
}
mName = name;
mPriority = priority;
+ mSleepTimeUs = sleepUs;
{
std::lock_guard lg(mThreadMutex);
mThreadContext = std::move(context);
@@ -134,7 +135,7 @@
LOG(DEBUG) << __func__ << " done processing, effect consumed " << status.fmqConsumed
<< " produced " << status.fmqProduced;
} else {
- // TODO: maybe add some sleep here to avoid busy waiting
+ usleep(mSleepTimeUs);
}
}
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 10aead2..984b9a1 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -34,6 +34,9 @@
#include "core-impl/Telephony.h"
#include "core-impl/utils.h"
+using aidl::android::hardware::audio::common::getFrameSizeInBytes;
+using aidl::android::hardware::audio::common::isBitPositionFlagSet;
+using aidl::android::hardware::audio::common::isValidAudioMode;
using aidl::android::hardware::audio::common::SinkMetadata;
using aidl::android::hardware::audio::common::SourceMetadata;
using aidl::android::hardware::audio::core::sounddose::ISoundDose;
@@ -57,9 +60,6 @@
using aidl::android::media::audio::common::Int;
using aidl::android::media::audio::common::MicrophoneInfo;
using aidl::android::media::audio::common::PcmType;
-using android::hardware::audio::common::getFrameSizeInBytes;
-using android::hardware::audio::common::isBitPositionFlagSet;
-using android::hardware::audio::common::isValidAudioMode;
namespace aidl::android::hardware::audio::core {
@@ -370,29 +370,41 @@
}
ndk::ScopedAStatus Module::getTelephony(std::shared_ptr<ITelephony>* _aidl_return) {
- if (mTelephony == nullptr) {
+ if (!mTelephony) {
mTelephony = ndk::SharedRefBase::make<Telephony>();
- mTelephonyBinder = mTelephony->asBinder();
- AIBinder_setMinSchedulerPolicy(mTelephonyBinder.get(), SCHED_NORMAL,
- ANDROID_PRIORITY_AUDIO);
}
- *_aidl_return = mTelephony;
+ *_aidl_return = mTelephony.getPtr();
LOG(DEBUG) << __func__ << ": returning instance of ITelephony: " << _aidl_return->get();
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus Module::getBluetooth(std::shared_ptr<IBluetooth>* _aidl_return) {
- if (mBluetooth == nullptr) {
+ if (!mBluetooth) {
mBluetooth = ndk::SharedRefBase::make<Bluetooth>();
- mBluetoothBinder = mBluetooth->asBinder();
- AIBinder_setMinSchedulerPolicy(mBluetoothBinder.get(), SCHED_NORMAL,
- ANDROID_PRIORITY_AUDIO);
}
- *_aidl_return = mBluetooth;
+ *_aidl_return = mBluetooth.getPtr();
LOG(DEBUG) << __func__ << ": returning instance of IBluetooth: " << _aidl_return->get();
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus Module::getBluetoothA2dp(std::shared_ptr<IBluetoothA2dp>* _aidl_return) {
+ if (!mBluetoothA2dp) {
+ mBluetoothA2dp = ndk::SharedRefBase::make<BluetoothA2dp>();
+ }
+ *_aidl_return = mBluetoothA2dp.getPtr();
+ LOG(DEBUG) << __func__ << ": returning instance of IBluetoothA2dp: " << _aidl_return->get();
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Module::getBluetoothLe(std::shared_ptr<IBluetoothLe>* _aidl_return) {
+ if (!mBluetoothLe) {
+ mBluetoothLe = ndk::SharedRefBase::make<BluetoothLe>();
+ }
+ *_aidl_return = mBluetoothLe.getPtr();
+ LOG(DEBUG) << __func__ << ": returning instance of IBluetoothLe: " << _aidl_return->get();
+ return ndk::ScopedAStatus::ok();
+}
+
ndk::ScopedAStatus Module::connectExternalDevice(const AudioPort& in_templateIdAndAdditionalData,
AudioPort* _aidl_return) {
const int32_t templateId = in_templateIdAndAdditionalData.id;
@@ -457,6 +469,7 @@
connectedPort.profiles = connectedProfilesIt->second;
}
ports.push_back(connectedPort);
+ onExternalDeviceConnectionChanged(connectedPort, true /*connected*/);
*_aidl_return = std::move(connectedPort);
std::vector<AudioRoute> newRoutes;
@@ -510,6 +523,7 @@
<< configIt->id;
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
+ onExternalDeviceConnectionChanged(*portIt, false /*connected*/);
ports.erase(portIt);
mConnectedDevicePorts.erase(in_portId);
LOG(DEBUG) << __func__ << ": connected device port " << in_portId << " released";
@@ -895,6 +909,21 @@
out_suggested->gain = in_requested.gain.value();
}
+ if (in_requested.ext.getTag() != AudioPortExt::Tag::unspecified) {
+ if (in_requested.ext.getTag() == out_suggested->ext.getTag()) {
+ if (out_suggested->ext.getTag() == AudioPortExt::Tag::mix) {
+ // 'AudioMixPortExt.handle' is set by the client, copy from in_requested
+ out_suggested->ext.get<AudioPortExt::Tag::mix>().handle =
+ in_requested.ext.get<AudioPortExt::Tag::mix>().handle;
+ }
+ } else {
+ LOG(WARNING) << __func__ << ": requested ext tag "
+ << toString(in_requested.ext.getTag()) << " do not match port's tag "
+ << toString(out_suggested->ext.getTag());
+ requestedIsValid = false;
+ }
+ }
+
if (existing == configs.end() && requestedIsValid && requestedIsFullySpecified) {
out_suggested->id = getConfig().nextPortId++;
configs.push_back(*out_suggested);
@@ -965,8 +994,17 @@
ndk::ScopedAStatus Module::setMasterMute(bool in_mute) {
LOG(DEBUG) << __func__ << ": " << in_mute;
- mMasterMute = in_mute;
- return ndk::ScopedAStatus::ok();
+ auto result = mDebug.simulateDeviceConnections ? ndk::ScopedAStatus::ok()
+ : onMasterMuteChanged(in_mute);
+ if (result.isOk()) {
+ mMasterMute = in_mute;
+ } else {
+ LOG(ERROR) << __func__ << ": failed calling onMasterMuteChanged(" << in_mute
+ << "), error=" << result;
+ // Reset master mute if it failed.
+ onMasterMuteChanged(mMasterMute);
+ }
+ return std::move(result);
}
ndk::ScopedAStatus Module::getMasterVolume(float* _aidl_return) {
@@ -978,8 +1016,17 @@
ndk::ScopedAStatus Module::setMasterVolume(float in_volume) {
LOG(DEBUG) << __func__ << ": " << in_volume;
if (in_volume >= 0.0f && in_volume <= 1.0f) {
- mMasterVolume = in_volume;
- return ndk::ScopedAStatus::ok();
+ auto result = mDebug.simulateDeviceConnections ? ndk::ScopedAStatus::ok()
+ : onMasterVolumeChanged(in_volume);
+ if (result.isOk()) {
+ mMasterVolume = in_volume;
+ } else {
+ // Reset master volume if it failed.
+ LOG(ERROR) << __func__ << ": failed calling onMasterVolumeChanged(" << in_volume
+ << "), error=" << result;
+ onMasterVolumeChanged(mMasterVolume);
+ }
+ return std::move(result);
}
LOG(ERROR) << __func__ << ": invalid master volume value: " << in_volume;
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
@@ -1024,13 +1071,10 @@
}
ndk::ScopedAStatus Module::getSoundDose(std::shared_ptr<ISoundDose>* _aidl_return) {
- if (mSoundDose == nullptr) {
+ if (!mSoundDose) {
mSoundDose = ndk::SharedRefBase::make<sounddose::SoundDose>();
- mSoundDoseBinder = mSoundDose->asBinder();
- AIBinder_setMinSchedulerPolicy(mSoundDoseBinder.get(), SCHED_NORMAL,
- ANDROID_PRIORITY_AUDIO);
}
- *_aidl_return = mSoundDose;
+ *_aidl_return = mSoundDose.getPtr();
LOG(DEBUG) << __func__ << ": returning instance of ISoundDose: " << _aidl_return->get();
return ndk::ScopedAStatus::ok();
}
@@ -1236,14 +1280,30 @@
}
ndk::ScopedAStatus Module::populateConnectedDevicePort(AudioPort* audioPort __unused) {
- LOG(DEBUG) << __func__ << ": do nothing and return ok";
+ LOG(VERBOSE) << __func__ << ": do nothing and return ok";
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus Module::checkAudioPatchEndpointsMatch(
const std::vector<AudioPortConfig*>& sources __unused,
const std::vector<AudioPortConfig*>& sinks __unused) {
- LOG(DEBUG) << __func__ << ": do nothing and return ok";
+ LOG(VERBOSE) << __func__ << ": do nothing and return ok";
+ return ndk::ScopedAStatus::ok();
+}
+
+void Module::onExternalDeviceConnectionChanged(
+ const ::aidl::android::media::audio::common::AudioPort& audioPort __unused,
+ bool connected __unused) {
+ LOG(DEBUG) << __func__ << ": do nothing and return";
+}
+
+ndk::ScopedAStatus Module::onMasterMuteChanged(bool mute __unused) {
+ LOG(VERBOSE) << __func__ << ": do nothing and return ok";
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Module::onMasterVolumeChanged(float volume __unused) {
+ LOG(VERBOSE) << __func__ << ": do nothing and return ok";
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/Stream.cpp b/audio/aidl/default/Stream.cpp
index 49ad2f2..77b0601 100644
--- a/audio/aidl/default/Stream.cpp
+++ b/audio/aidl/default/Stream.cpp
@@ -24,6 +24,9 @@
#include "core-impl/Module.h"
#include "core-impl/Stream.h"
+using aidl::android::hardware::audio::common::AudioOffloadMetadata;
+using aidl::android::hardware::audio::common::getChannelCount;
+using aidl::android::hardware::audio::common::getFrameSizeInBytes;
using aidl::android::hardware::audio::common::SinkMetadata;
using aidl::android::hardware::audio::common::SourceMetadata;
using aidl::android::media::audio::common::AudioDevice;
@@ -33,8 +36,6 @@
using aidl::android::media::audio::common::AudioPlaybackRate;
using aidl::android::media::audio::common::MicrophoneDynamicInfo;
using aidl::android::media::audio::common::MicrophoneInfo;
-using android::hardware::audio::common::getChannelCount;
-using android::hardware::audio::common::getFrameSizeInBytes;
namespace aidl::android::hardware::audio::core {
@@ -659,6 +660,16 @@
}
template <class Metadata>
+ndk::ScopedAStatus StreamCommonImpl<Metadata>::prepareToClose() {
+ LOG(DEBUG) << __func__;
+ if (!isClosed()) {
+ return ndk::ScopedAStatus::ok();
+ }
+ LOG(ERROR) << __func__ << ": stream was closed";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+}
+
+template <class Metadata>
void StreamCommonImpl<Metadata>::stopWorker() {
if (auto commandMQ = mContext.getCommandMQ(); commandMQ != nullptr) {
LOG(DEBUG) << __func__ << ": asking the worker to exit...";
@@ -785,6 +796,40 @@
LOG(DEBUG) << __func__;
}
+ndk::ScopedAStatus StreamOut::updateOffloadMetadata(
+ const AudioOffloadMetadata& in_offloadMetadata) {
+ LOG(DEBUG) << __func__;
+ if (isClosed()) {
+ LOG(ERROR) << __func__ << ": stream was closed";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ if (!mOffloadInfo.has_value()) {
+ LOG(ERROR) << __func__ << ": not a compressed offload stream";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ if (in_offloadMetadata.sampleRate < 0) {
+ LOG(ERROR) << __func__ << ": invalid sample rate value: " << in_offloadMetadata.sampleRate;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ if (in_offloadMetadata.averageBitRatePerSecond < 0) {
+ LOG(ERROR) << __func__
+ << ": invalid average BPS value: " << in_offloadMetadata.averageBitRatePerSecond;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ if (in_offloadMetadata.delayFrames < 0) {
+ LOG(ERROR) << __func__
+ << ": invalid delay frames value: " << in_offloadMetadata.delayFrames;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ if (in_offloadMetadata.paddingFrames < 0) {
+ LOG(ERROR) << __func__
+ << ": invalid padding frames value: " << in_offloadMetadata.paddingFrames;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ mOffloadMetadata = in_offloadMetadata;
+ return ndk::ScopedAStatus::ok();
+}
+
ndk::ScopedAStatus StreamOut::getHwVolume(std::vector<float>* _aidl_return) {
LOG(DEBUG) << __func__;
(void)_aidl_return;
diff --git a/audio/aidl/default/StreamStub.cpp b/audio/aidl/default/StreamStub.cpp
index 0ed9357..2467320 100644
--- a/audio/aidl/default/StreamStub.cpp
+++ b/audio/aidl/default/StreamStub.cpp
@@ -14,8 +14,11 @@
* limitations under the License.
*/
+#include <cmath>
+
#define LOG_TAG "AHAL_Stream"
#include <android-base/logging.h>
+#include <audio_utils/clock.h>
#include "core-impl/Module.h"
#include "core-impl/StreamStub.h"
@@ -29,31 +32,42 @@
namespace aidl::android::hardware::audio::core {
DriverStub::DriverStub(const StreamContext& context, bool isInput)
- : mFrameSizeBytes(context.getFrameSize()), mIsInput(isInput) {}
+ : mFrameSizeBytes(context.getFrameSize()),
+ mSampleRate(context.getSampleRate()),
+ mIsAsynchronous(!!context.getAsyncCallback()),
+ mIsInput(isInput) {}
::android::status_t DriverStub::init() {
- usleep(1000);
+ usleep(500);
return ::android::OK;
}
::android::status_t DriverStub::drain(StreamDescriptor::DrainMode) {
- usleep(1000);
+ usleep(500);
return ::android::OK;
}
::android::status_t DriverStub::flush() {
- usleep(1000);
+ usleep(500);
return ::android::OK;
}
::android::status_t DriverStub::pause() {
- usleep(1000);
+ usleep(500);
return ::android::OK;
}
::android::status_t DriverStub::transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
int32_t* latencyMs) {
- usleep(3000);
+ static constexpr float kMicrosPerSecond = MICROS_PER_SECOND;
+ static constexpr float kScaleFactor = .8f;
+ if (mIsAsynchronous) {
+ usleep(500);
+ } else {
+ const size_t delayUs = static_cast<size_t>(
+ std::roundf(kScaleFactor * frameCount * kMicrosPerSecond / mSampleRate));
+ usleep(delayUs);
+ }
if (mIsInput) {
uint8_t* byteBuffer = static_cast<uint8_t*>(buffer);
for (size_t i = 0; i < frameCount * mFrameSizeBytes; ++i) {
@@ -66,12 +80,13 @@
}
::android::status_t DriverStub::standby() {
- usleep(1000);
+ usleep(500);
return ::android::OK;
}
::android::status_t DriverStub::setConnectedDevices(
const std::vector<AudioDevice>& connectedDevices __unused) {
+ usleep(500);
return ::android::OK;
}
diff --git a/audio/aidl/default/Telephony.cpp b/audio/aidl/default/Telephony.cpp
index ad22470..bf05a8d 100644
--- a/audio/aidl/default/Telephony.cpp
+++ b/audio/aidl/default/Telephony.cpp
@@ -22,10 +22,10 @@
#include "core-impl/Telephony.h"
+using aidl::android::hardware::audio::common::isValidAudioMode;
using aidl::android::media::audio::common::AudioMode;
using aidl::android::media::audio::common::Boolean;
using aidl::android::media::audio::common::Float;
-using android::hardware::audio::common::isValidAudioMode;
namespace aidl::android::hardware::audio::core {
diff --git a/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp b/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp
index f5af81e..561f9a3 100644
--- a/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp
+++ b/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp
@@ -17,10 +17,9 @@
#include <algorithm>
#include <cstddef>
#include <memory>
-#define LOG_TAG "AHAL_AcousticEchoCancelerSw"
-#include <Utils.h>
#include <unordered_set>
+#define LOG_TAG "AHAL_AcousticEchoCancelerSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/audio_effects_config.xml b/audio/aidl/default/audio_effects_config.xml
index 88c4459..c06742d 100644
--- a/audio/aidl/default/audio_effects_config.xml
+++ b/audio/aidl/default/audio_effects_config.xml
@@ -40,6 +40,7 @@
<library name="loudness_enhancer" path="libloudnessenhanceraidl.so"/>
<library name="nssw" path="libnssw.so"/>
<library name="env_reverbsw" path="libenvreverbsw.so"/>
+ <library name="pre_processing" path="libpreprocessingaidl.so"/>
<library name="preset_reverbsw" path="libpresetreverbsw.so"/>
<library name="reverb" path="libreverbaidl.so"/>
<library name="virtualizersw" path="libvirtualizersw.so"/>
@@ -68,9 +69,7 @@
-->
<effects>
- <effect name="acoustic_echo_canceler" library="aecsw" uuid="bb392ec0-8d4d-11e0-a896-0002a5d5c51b"/>
- <effect name="automatic_gain_control_v1" library="agc1sw" uuid="aa8130e0-66fc-11e0-bad0-0002a5d5c51b"/>
- <effect name="automatic_gain_control_v2" library="agc2sw" uuid="89f38e65-d4d2-4d64-ad0e-2b3e799ea886"/>
+ <effect name="automatic_gain_control_v2" library="pre_processing" uuid="89f38e65-d4d2-4d64-ad0e-2b3e799ea886"/>
<effectProxy name="bassboost" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
<libsw library="bassboostsw" uuid="fa8181f2-588b-11ed-9b6a-0242ac120002"/>
<libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
@@ -80,7 +79,6 @@
<effect name="haptic_generator" library="haptic_generator" uuid="97c4acd1-8b82-4f2f-832e-c2fe5d7a9931"/>
<effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/>
<effect name="env_reverb" library="env_reverbsw" uuid="fa819886-588b-11ed-9b6a-0242ac120002"/>
- <effect name="noise_suppression" library="nssw" uuid="c06c8400-8e06-11e0-9cb6-0002a5d5c51b"/>
<effect name="preset_reverb" library="preset_reverbsw" uuid="fa8199c6-588b-11ed-9b6a-0242ac120002"/>
<effect name="reverb_env_aux" library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
<effect name="reverb_env_ins" library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
diff --git a/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp b/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp
index 8441f22..50712a4 100644
--- a/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp
+++ b/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp
@@ -17,10 +17,8 @@
#include <algorithm>
#include <cstddef>
#include <memory>
-#define LOG_TAG "AHAL_AutomaticGainControlV2Sw"
-#include <Utils.h>
-#include <unordered_set>
+#define LOG_TAG "AHAL_AutomaticGainControlV2Sw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/bassboost/BassBoostSw.cpp b/audio/aidl/default/bassboost/BassBoostSw.cpp
index e50f0a2..fb5374f 100644
--- a/audio/aidl/default/bassboost/BassBoostSw.cpp
+++ b/audio/aidl/default/bassboost/BassBoostSw.cpp
@@ -17,10 +17,8 @@
#include <algorithm>
#include <cstddef>
#include <memory>
-#define LOG_TAG "AHAL_BassBoostSw"
-#include <Utils.h>
-#include <unordered_set>
+#define LOG_TAG "AHAL_BassBoostSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/downmix/DownmixSw.cpp b/audio/aidl/default/downmix/DownmixSw.cpp
index 0af95d0..81a4c89 100644
--- a/audio/aidl/default/downmix/DownmixSw.cpp
+++ b/audio/aidl/default/downmix/DownmixSw.cpp
@@ -14,12 +14,10 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_DownmixSw"
-#include <Utils.h>
#include <algorithm>
-#include <unordered_set>
+#include <cstddef>
+#define LOG_TAG "AHAL_DownmixSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp
index da6d0c6..1dda6d1 100644
--- a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp
+++ b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp
@@ -14,13 +14,12 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_DynamicsProcessingSw"
-#include <Utils.h>
#include <algorithm>
+#include <cstddef>
#include <set>
#include <unordered_set>
+#define LOG_TAG "AHAL_DynamicsProcessingSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
@@ -170,7 +169,7 @@
EX_ILLEGAL_ARGUMENT, "inputGainCfgFailed");
return ndk::ScopedAStatus::ok();
}
- case DynamicsProcessing::vendorExtension: {
+ case DynamicsProcessing::vendor: {
LOG(ERROR) << __func__ << " unsupported tag: " << toString(tag);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(
EX_ILLEGAL_ARGUMENT, "DynamicsProcessingTagNotSupported");
@@ -237,7 +236,7 @@
dpParam.set<DynamicsProcessing::inputGain>(mContext->getInputGainCfgs());
break;
}
- case DynamicsProcessing::vendorExtension: {
+ case DynamicsProcessing::vendor: {
LOG(ERROR) << __func__ << " unsupported tag: " << toString(tag);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(
EX_ILLEGAL_ARGUMENT, "DynamicsProcessingTagNotSupported");
@@ -282,8 +281,8 @@
RetCode DynamicsProcessingSwContext::setCommon(const Parameter::Common& common) {
mCommon = common;
- mChannelCount =
- ::android::hardware::audio::common::getChannelCount(common.input.base.channelMask);
+ mChannelCount = ::aidl::android::hardware::audio::common::getChannelCount(
+ common.input.base.channelMask);
resizeChannels();
resizeBands();
LOG(INFO) << __func__ << mCommon.toString();
diff --git a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h
index 3e14cce..769f9ef 100644
--- a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h
+++ b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h
@@ -16,10 +16,13 @@
#pragma once
-#include <aidl/android/hardware/audio/effect/BnEffect.h>
-#include <fmq/AidlMessageQueue.h>
#include <cstdlib>
#include <memory>
+#include <vector>
+
+#include <Utils.h>
+#include <aidl/android/hardware/audio/effect/BnEffect.h>
+#include <fmq/AidlMessageQueue.h>
#include "effect-impl/EffectImpl.h"
#include "effect-impl/EffectUUID.h"
@@ -30,7 +33,7 @@
public:
DynamicsProcessingSwContext(int statusDepth, const Parameter::Common& common)
: EffectContext(statusDepth, common),
- mChannelCount(::android::hardware::audio::common::getChannelCount(
+ mChannelCount(::aidl::android::hardware::audio::common::getChannelCount(
common.input.base.channelMask)),
mPreEqChCfgs(mChannelCount, {.channel = kInvalidChannelId}),
mPostEqChCfgs(mChannelCount, {.channel = kInvalidChannelId}),
diff --git a/audio/aidl/default/envReverb/EnvReverbSw.cpp b/audio/aidl/default/envReverb/EnvReverbSw.cpp
index 46d9016..29288ca 100644
--- a/audio/aidl/default/envReverb/EnvReverbSw.cpp
+++ b/audio/aidl/default/envReverb/EnvReverbSw.cpp
@@ -14,12 +14,11 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_EnvReverbSw"
-#include <Utils.h>
#include <algorithm>
+#include <cstddef>
#include <unordered_set>
+#define LOG_TAG "AHAL_EnvReverbSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
@@ -66,6 +65,8 @@
MAKE_RANGE(EnvironmentalReverb, roomHfLevelMb, -4000, 0),
MAKE_RANGE(EnvironmentalReverb, decayTimeMs, 0, 7000),
MAKE_RANGE(EnvironmentalReverb, decayHfRatioPm, 100, 2000),
+ MAKE_RANGE(EnvironmentalReverb, reflectionsLevelMb, -6000, 0),
+ MAKE_RANGE(EnvironmentalReverb, reflectionsDelayMs, 0, 65),
MAKE_RANGE(EnvironmentalReverb, levelMb, -6000, 0),
MAKE_RANGE(EnvironmentalReverb, delayMs, 0, 65),
MAKE_RANGE(EnvironmentalReverb, diffusionPm, 0, 1000),
@@ -125,6 +126,20 @@
EX_ILLEGAL_ARGUMENT, "setDecayHfRatioFailed");
return ndk::ScopedAStatus::ok();
}
+ case EnvironmentalReverb::reflectionsLevelMb: {
+ RETURN_IF(mContext->setErReflectionsLevel(
+ erParam.get<EnvironmentalReverb::reflectionsLevelMb>()) !=
+ RetCode::SUCCESS,
+ EX_ILLEGAL_ARGUMENT, "setReflectionsLevelFailed");
+ return ndk::ScopedAStatus::ok();
+ }
+ case EnvironmentalReverb::reflectionsDelayMs: {
+ RETURN_IF(mContext->setErReflectionsDelay(
+ erParam.get<EnvironmentalReverb::reflectionsDelayMs>()) !=
+ RetCode::SUCCESS,
+ EX_ILLEGAL_ARGUMENT, "setReflectionsDelayFailed");
+ return ndk::ScopedAStatus::ok();
+ }
case EnvironmentalReverb::levelMb: {
RETURN_IF(mContext->setErLevel(erParam.get<EnvironmentalReverb::levelMb>()) !=
RetCode::SUCCESS,
@@ -201,6 +216,14 @@
erParam.set<EnvironmentalReverb::decayHfRatioPm>(mContext->getErDecayHfRatio());
break;
}
+ case EnvironmentalReverb::reflectionsLevelMb: {
+ erParam.set<EnvironmentalReverb::reflectionsLevelMb>(mContext->getErReflectionsLevel());
+ break;
+ }
+ case EnvironmentalReverb::reflectionsDelayMs: {
+ erParam.set<EnvironmentalReverb::reflectionsDelayMs>(mContext->getErReflectionsDelay());
+ break;
+ }
case EnvironmentalReverb::levelMb: {
erParam.set<EnvironmentalReverb::levelMb>(mContext->getErLevel());
break;
diff --git a/audio/aidl/default/envReverb/EnvReverbSw.h b/audio/aidl/default/envReverb/EnvReverbSw.h
index 4f11a5c..dd2cf5d 100644
--- a/audio/aidl/default/envReverb/EnvReverbSw.h
+++ b/audio/aidl/default/envReverb/EnvReverbSw.h
@@ -58,12 +58,23 @@
int getErDensity() const { return mDensity; }
RetCode setErBypass(bool bypass) {
- // TODO : Add implementation to apply new bypass
mBypass = bypass;
return RetCode::SUCCESS;
}
bool getErBypass() const { return mBypass; }
+ RetCode setErReflectionsDelay(int delay) {
+ mReflectionsDelayMs = delay;
+ return RetCode::SUCCESS;
+ }
+ bool getErReflectionsDelay() const { return mReflectionsDelayMs; }
+
+ RetCode setErReflectionsLevel(int level) {
+ mReflectionsLevelMb = level;
+ return RetCode::SUCCESS;
+ }
+ bool getErReflectionsLevel() const { return mReflectionsLevelMb; }
+
private:
int mRoomLevel = -6000; // Default room level
int mRoomHfLevel = 0; // Default room hf level
@@ -71,6 +82,8 @@
int mDecayHfRatio = 500; // Default decay hf ratio
int mLevel = -6000; // Default level
int mDelay = 40; // Default delay
+ int mReflectionsLevelMb = 0;
+ int mReflectionsDelayMs = 0;
int mDiffusion = 1000; // Default diffusion
int mDensity = 1000; // Default density
bool mBypass = false; // Default bypass
diff --git a/audio/aidl/default/equalizer/EqualizerSw.cpp b/audio/aidl/default/equalizer/EqualizerSw.cpp
index 2814322..0fa7a11 100644
--- a/audio/aidl/default/equalizer/EqualizerSw.cpp
+++ b/audio/aidl/default/equalizer/EqualizerSw.cpp
@@ -14,12 +14,10 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_EqualizerSw"
-#include <Utils.h>
#include <algorithm>
-#include <unordered_set>
+#include <cstddef>
+#define LOG_TAG "AHAL_EqualizerSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
@@ -76,11 +74,10 @@
const std::vector<Range::EqualizerRange> EqualizerSw::kRanges = {
MAKE_RANGE(Equalizer, preset, 0, EqualizerSw::kPresets.size() - 1),
MAKE_RANGE(Equalizer, bandLevels,
- std::vector<Equalizer::BandLevel>{Equalizer::BandLevel(
- {.index = 0, .levelMb = std::numeric_limits<int>::min()})},
std::vector<Equalizer::BandLevel>{
- Equalizer::BandLevel({.index = EqualizerSwContext::kMaxBandNumber - 1,
- .levelMb = std::numeric_limits<int>::max()})}),
+ Equalizer::BandLevel({.index = 0, .levelMb = -15})},
+ std::vector<Equalizer::BandLevel>{Equalizer::BandLevel(
+ {.index = EqualizerSwContext::kMaxBandNumber - 1, .levelMb = 15})}),
/* capability definition */
MAKE_RANGE(Equalizer, bandFrequencies, EqualizerSw::kBandFrequency,
EqualizerSw::kBandFrequency),
@@ -171,6 +168,14 @@
eqParam.set<Equalizer::centerFreqMh>(mContext->getCenterFreqs());
break;
}
+ case Equalizer::bandFrequencies: {
+ eqParam.set<Equalizer::bandFrequencies>(kBandFrequency);
+ break;
+ }
+ case Equalizer::presets: {
+ eqParam.set<Equalizer::presets>(kPresets);
+ break;
+ }
default: {
LOG(ERROR) << __func__ << " not handled tag: " << toString(tag);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
diff --git a/audio/aidl/default/extension/ExtensionEffect.cpp b/audio/aidl/default/extension/ExtensionEffect.cpp
index d2e3ccd..db1e4a4 100644
--- a/audio/aidl/default/extension/ExtensionEffect.cpp
+++ b/audio/aidl/default/extension/ExtensionEffect.cpp
@@ -19,9 +19,8 @@
#include <memory>
#include <unordered_set>
-#define LOG_TAG "AHAL_ExtensionEffect"
-#include <Utils.h>
#include <aidl/android/hardware/audio/effect/DefaultExtension.h>
+#define LOG_TAG "AHAL_ExtensionEffect"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
@@ -88,7 +87,7 @@
std::optional<DefaultExtension> defaultExt;
RETURN_IF(STATUS_OK != vendorEffect.extension.getParcelable(&defaultExt), EX_ILLEGAL_ARGUMENT,
"getParcelableFailed");
- RETURN_IF(!defaultExt.has_value(), EX_ILLEGAL_ARGUMENT, "parcelableNulld");
+ RETURN_IF(!defaultExt.has_value(), EX_ILLEGAL_ARGUMENT, "parcelableNull");
RETURN_IF(mContext->setParams(defaultExt->bytes) != RetCode::SUCCESS, EX_ILLEGAL_ARGUMENT,
"paramNotSupported");
@@ -99,10 +98,15 @@
Parameter::Specific* specific) {
auto tag = id.getTag();
RETURN_IF(Parameter::Id::vendorEffectTag != tag, EX_ILLEGAL_ARGUMENT, "wrongIdTag");
- auto specificId = id.get<Parameter::Id::vendorEffectTag>();
+ auto extensionId = id.get<Parameter::Id::vendorEffectTag>();
+ std::optional<DefaultExtension> defaultIdExt;
+ RETURN_IF(STATUS_OK != extensionId.extension.getParcelable(&defaultIdExt), EX_ILLEGAL_ARGUMENT,
+ "getIdParcelableFailed");
+ RETURN_IF(!defaultIdExt.has_value(), EX_ILLEGAL_ARGUMENT, "parcelableIdNull");
+
VendorExtension extension;
DefaultExtension defaultExt;
- defaultExt.bytes = mContext->getParams(specificId);
+ defaultExt.bytes = mContext->getParams(defaultIdExt->bytes);
RETURN_IF(STATUS_OK != extension.extension.setParcelable(defaultExt), EX_ILLEGAL_ARGUMENT,
"setParcelableFailed");
specific->set<Parameter::Specific::vendorEffect>(extension);
diff --git a/audio/aidl/default/extension/ExtensionEffect.h b/audio/aidl/default/extension/ExtensionEffect.h
index 399fa83..f432d40 100644
--- a/audio/aidl/default/extension/ExtensionEffect.h
+++ b/audio/aidl/default/extension/ExtensionEffect.h
@@ -37,7 +37,7 @@
mParams = params;
return RetCode::SUCCESS;
}
- std::vector<uint8_t> getParams(int tag __unused) const { return mParams; }
+ std::vector<uint8_t> getParams(std::vector<uint8_t> id __unused) const { return mParams; }
private:
std::vector<uint8_t> mParams;
diff --git a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp
index 6037ad2..944f715 100644
--- a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp
+++ b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp
@@ -14,12 +14,10 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_HapticGeneratorSw"
-#include <Utils.h>
#include <algorithm>
-#include <unordered_set>
+#include <cstddef>
+#define LOG_TAG "AHAL_HapticGeneratorSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/include/core-impl/Bluetooth.h b/audio/aidl/default/include/core-impl/Bluetooth.h
index f2e762d..10e9045 100644
--- a/audio/aidl/default/include/core-impl/Bluetooth.h
+++ b/audio/aidl/default/include/core-impl/Bluetooth.h
@@ -17,6 +17,8 @@
#pragma once
#include <aidl/android/hardware/audio/core/BnBluetooth.h>
+#include <aidl/android/hardware/audio/core/BnBluetoothA2dp.h>
+#include <aidl/android/hardware/audio/core/BnBluetoothLe.h>
namespace aidl::android::hardware::audio::core {
@@ -32,4 +34,34 @@
HfpConfig mHfpConfig;
};
+class BluetoothA2dp : public BnBluetoothA2dp {
+ public:
+ BluetoothA2dp() = default;
+
+ private:
+ ndk::ScopedAStatus isEnabled(bool* _aidl_return) override;
+ ndk::ScopedAStatus setEnabled(bool in_enabled) override;
+ ndk::ScopedAStatus supportsOffloadReconfiguration(bool* _aidl_return) override;
+ ndk::ScopedAStatus reconfigureOffload(
+ const std::vector<::aidl::android::hardware::audio::core::VendorParameter>&
+ in_parameters) override;
+
+ bool mEnabled = false;
+};
+
+class BluetoothLe : public BnBluetoothLe {
+ public:
+ BluetoothLe() = default;
+
+ private:
+ ndk::ScopedAStatus isEnabled(bool* _aidl_return) override;
+ ndk::ScopedAStatus setEnabled(bool in_enabled) override;
+ ndk::ScopedAStatus supportsOffloadReconfiguration(bool* _aidl_return) override;
+ ndk::ScopedAStatus reconfigureOffload(
+ const std::vector<::aidl::android::hardware::audio::core::VendorParameter>&
+ in_parameters) override;
+
+ bool mEnabled = false;
+};
+
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 8365b34..2cbda7d 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -46,11 +46,33 @@
bool forceTransientBurst = false;
bool forceSynchronousDrain = false;
};
+ // Helper used for interfaces that require a persistent instance. We hold them via a strong
+ // pointer. The binder token is retained for a call to 'setMinSchedulerPolicy'.
+ template <class C>
+ struct ChildInterface : private std::pair<std::shared_ptr<C>, ndk::SpAIBinder> {
+ ChildInterface() {}
+ ChildInterface& operator=(const std::shared_ptr<C>& c) {
+ return operator=(std::shared_ptr<C>(c));
+ }
+ ChildInterface& operator=(std::shared_ptr<C>&& c) {
+ this->first = std::move(c);
+ this->second = this->first->asBinder();
+ AIBinder_setMinSchedulerPolicy(this->second.get(), SCHED_NORMAL,
+ ANDROID_PRIORITY_AUDIO);
+ return *this;
+ }
+ explicit operator bool() const { return !!this->first; }
+ C& operator*() const { return *(this->first); }
+ C* operator->() const { return this->first; }
+ std::shared_ptr<C> getPtr() const { return this->first; }
+ };
ndk::ScopedAStatus setModuleDebug(
const ::aidl::android::hardware::audio::core::ModuleDebug& in_debug) override;
ndk::ScopedAStatus getTelephony(std::shared_ptr<ITelephony>* _aidl_return) override;
ndk::ScopedAStatus getBluetooth(std::shared_ptr<IBluetooth>* _aidl_return) override;
+ ndk::ScopedAStatus getBluetoothA2dp(std::shared_ptr<IBluetoothA2dp>* _aidl_return) override;
+ ndk::ScopedAStatus getBluetoothLe(std::shared_ptr<IBluetoothLe>* _aidl_return) override;
ndk::ScopedAStatus connectExternalDevice(
const ::aidl::android::media::audio::common::AudioPort& in_templateIdAndAdditionalData,
::aidl::android::media::audio::common::AudioPort* _aidl_return) override;
@@ -143,7 +165,7 @@
bool isMmapSupported();
// This value is used for all AudioPatches.
- static constexpr int32_t kMinimumStreamBufferSizeFrames = 16;
+ static constexpr int32_t kMinimumStreamBufferSizeFrames = 256;
// The maximum stream buffer size is 1 GiB = 2 ** 30 bytes;
static constexpr int32_t kMaximumStreamBufferSizeBytes = 1 << 30;
@@ -151,23 +173,18 @@
std::unique_ptr<internal::Configuration> mConfig;
ModuleDebug mDebug;
VendorDebug mVendorDebug;
- // For the interfaces requiring to return the same instance, we need to hold them
- // via a strong pointer. The binder token is retained for a call to 'setMinSchedulerPolicy'.
- std::shared_ptr<ITelephony> mTelephony;
- ndk::SpAIBinder mTelephonyBinder;
- std::shared_ptr<IBluetooth> mBluetooth;
- ndk::SpAIBinder mBluetoothBinder;
+ ChildInterface<ITelephony> mTelephony;
+ ChildInterface<IBluetooth> mBluetooth;
+ ChildInterface<IBluetoothA2dp> mBluetoothA2dp;
+ ChildInterface<IBluetoothLe> mBluetoothLe;
// ids of ports created at runtime via 'connectExternalDevice'.
std::set<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.
std::multimap<int32_t, int32_t> mPatches;
- bool mMasterMute = false;
- float mMasterVolume = 1.0f;
bool mMicMute = false;
- std::shared_ptr<sounddose::ISoundDose> mSoundDose;
- ndk::SpAIBinder mSoundDoseBinder;
+ ChildInterface<sounddose::ISoundDose> mSoundDose;
std::optional<bool> mIsMmapSupported;
protected:
@@ -180,6 +197,13 @@
virtual ndk::ScopedAStatus checkAudioPatchEndpointsMatch(
const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sources,
const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sinks);
+ virtual void onExternalDeviceConnectionChanged(
+ const ::aidl::android::media::audio::common::AudioPort& audioPort, bool connected);
+ virtual ndk::ScopedAStatus onMasterMuteChanged(bool mute);
+ virtual ndk::ScopedAStatus onMasterVolumeChanged(float volume);
+
+ bool mMasterMute = false;
+ float mMasterVolume = 1.0f;
};
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/ModuleUsb.h b/audio/aidl/default/include/core-impl/ModuleUsb.h
index 7b177e8..1aa2244 100644
--- a/audio/aidl/default/include/core-impl/ModuleUsb.h
+++ b/audio/aidl/default/include/core-impl/ModuleUsb.h
@@ -28,10 +28,6 @@
// IModule interfaces
ndk::ScopedAStatus getTelephony(std::shared_ptr<ITelephony>* _aidl_return) override;
ndk::ScopedAStatus getBluetooth(std::shared_ptr<IBluetooth>* _aidl_return) override;
- ndk::ScopedAStatus getMasterMute(bool* _aidl_return) override;
- ndk::ScopedAStatus setMasterMute(bool in_mute) override;
- ndk::ScopedAStatus getMasterVolume(float* _aidl_return) override;
- ndk::ScopedAStatus setMasterVolume(float in_volume) override;
ndk::ScopedAStatus getMicMute(bool* _aidl_return) override;
ndk::ScopedAStatus setMicMute(bool in_mute) override;
@@ -42,6 +38,11 @@
const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sources,
const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sinks)
override;
+ void onExternalDeviceConnectionChanged(
+ const ::aidl::android::media::audio::common::AudioPort& audioPort,
+ bool connected) override;
+ ndk::ScopedAStatus onMasterMuteChanged(bool mute) override;
+ ndk::ScopedAStatus onMasterVolumeChanged(float volume) override;
};
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/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/Stream.h b/audio/aidl/default/include/core-impl/Stream.h
index 0d4365a3..65680df 100644
--- a/audio/aidl/default/include/core-impl/Stream.h
+++ b/audio/aidl/default/include/core-impl/Stream.h
@@ -294,6 +294,7 @@
struct StreamCommonInterface {
virtual ~StreamCommonInterface() = default;
virtual ndk::ScopedAStatus close() = 0;
+ virtual ndk::ScopedAStatus prepareToClose() = 0;
virtual ndk::ScopedAStatus updateHwAvSyncId(int32_t in_hwAvSyncId) = 0;
virtual ndk::ScopedAStatus getVendorParameters(const std::vector<std::string>& in_ids,
std::vector<VendorParameter>* _aidl_return) = 0;
@@ -318,6 +319,11 @@
return delegate != nullptr ? delegate->close()
: ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
+ ndk::ScopedAStatus prepareToClose() override {
+ auto delegate = mDelegate.lock();
+ return delegate != nullptr ? delegate->prepareToClose()
+ : ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
ndk::ScopedAStatus updateHwAvSyncId(int32_t in_hwAvSyncId) override {
auto delegate = mDelegate.lock();
return delegate != nullptr ? delegate->updateHwAvSyncId(in_hwAvSyncId)
@@ -359,6 +365,7 @@
class StreamCommonImpl : public StreamCommonInterface {
public:
ndk::ScopedAStatus close() override;
+ ndk::ScopedAStatus prepareToClose() override;
ndk::ScopedAStatus updateHwAvSyncId(int32_t in_hwAvSyncId) override;
ndk::ScopedAStatus getVendorParameters(const std::vector<std::string>& in_ids,
std::vector<VendorParameter>* _aidl_return) override;
@@ -463,6 +470,9 @@
return StreamCommonImpl<::aidl::android::hardware::audio::common::SourceMetadata>::
updateMetadata(in_sourceMetadata);
}
+ ndk::ScopedAStatus updateOffloadMetadata(
+ const ::aidl::android::hardware::audio::common::AudioOffloadMetadata&
+ in_offloadMetadata) override;
ndk::ScopedAStatus getHwVolume(std::vector<float>* _aidl_return) override;
ndk::ScopedAStatus setHwVolume(const std::vector<float>& in_channelVolumes) override;
ndk::ScopedAStatus getAudioDescriptionMixLevel(float* _aidl_return) override;
@@ -500,6 +510,7 @@
offloadInfo);
std::optional<::aidl::android::media::audio::common::AudioOffloadInfo> mOffloadInfo;
+ std::optional<::aidl::android::hardware::audio::common::AudioOffloadMetadata> mOffloadMetadata;
public:
using CreateInstance = std::function<ndk::ScopedAStatus(
diff --git a/audio/aidl/default/include/core-impl/StreamStub.h b/audio/aidl/default/include/core-impl/StreamStub.h
index 69fd7b3..df0182c 100644
--- a/audio/aidl/default/include/core-impl/StreamStub.h
+++ b/audio/aidl/default/include/core-impl/StreamStub.h
@@ -36,6 +36,8 @@
private:
const size_t mFrameSizeBytes;
+ const int mSampleRate;
+ const bool mIsAsynchronous;
const bool mIsInput;
};
diff --git a/audio/aidl/default/include/core-impl/StreamUsb.h b/audio/aidl/default/include/core-impl/StreamUsb.h
index c04dc66..f1815dd 100644
--- a/audio/aidl/default/include/core-impl/StreamUsb.h
+++ b/audio/aidl/default/include/core-impl/StreamUsb.h
@@ -17,6 +17,7 @@
#pragma once
#include <mutex>
+#include <vector>
#include <aidl/android/media/audio/common/AudioChannelLayout.h>
@@ -93,6 +94,12 @@
StreamContext&& context,
const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
offloadInfo);
+
+ ndk::ScopedAStatus getHwVolume(std::vector<float>* _aidl_return) override;
+ ndk::ScopedAStatus setHwVolume(const std::vector<float>& in_channelVolumes) override;
+
+ int mChannelCount;
+ std::vector<float> mHwVolumes;
};
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/effect-impl/EffectContext.h b/audio/aidl/default/include/effect-impl/EffectContext.h
index 2ab0ade..8b4a7d2 100644
--- a/audio/aidl/default/include/effect-impl/EffectContext.h
+++ b/audio/aidl/default/include/effect-impl/EffectContext.h
@@ -15,10 +15,10 @@
*/
#pragma once
-#include <Utils.h>
#include <memory>
#include <vector>
+#include <Utils.h>
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
@@ -46,9 +46,9 @@
LOG_ALWAYS_FATAL_IF(output.base.format.pcm !=
aidl::android::media::audio::common::PcmType::FLOAT_32_BIT,
"outputFormatNotFloat");
- mInputFrameSize = ::android::hardware::audio::common::getFrameSizeInBytes(
+ mInputFrameSize = ::aidl::android::hardware::audio::common::getFrameSizeInBytes(
input.base.format, input.base.channelMask);
- mOutputFrameSize = ::android::hardware::audio::common::getFrameSizeInBytes(
+ mOutputFrameSize = ::aidl::android::hardware::audio::common::getFrameSizeInBytes(
output.base.format, output.base.channelMask);
// in/outBuffer size in float (FMQ data format defined for DataMQ)
size_t inBufferSizeInFloat = input.frameCount * mInputFrameSize / sizeof(float);
diff --git a/audio/aidl/default/include/effect-impl/EffectThread.h b/audio/aidl/default/include/effect-impl/EffectThread.h
index 9b1a75b..f9c6a31 100644
--- a/audio/aidl/default/include/effect-impl/EffectThread.h
+++ b/audio/aidl/default/include/effect-impl/EffectThread.h
@@ -35,7 +35,7 @@
// called by effect implementation.
RetCode createThread(std::shared_ptr<EffectContext> context, const std::string& name,
- const int priority = ANDROID_PRIORITY_URGENT_AUDIO);
+ int priority = ANDROID_PRIORITY_URGENT_AUDIO, int sleepUs = kSleepTimeUs);
RetCode destroyThread();
RetCode startThread();
RetCode stopThread();
@@ -72,7 +72,8 @@
virtual void process_l() REQUIRES(mThreadMutex);
private:
- const int kMaxTaskNameLen = 15;
+ static constexpr int kMaxTaskNameLen = 15;
+ static constexpr int kSleepTimeUs = 2000; // in micro-second
std::mutex mThreadMutex;
std::condition_variable mCv;
bool mExit GUARDED_BY(mThreadMutex) = false;
@@ -80,6 +81,7 @@
std::shared_ptr<EffectContext> mThreadContext GUARDED_BY(mThreadMutex);
std::thread mThread;
int mPriority;
+ int mSleepTimeUs = kSleepTimeUs; // sleep time in micro-second
std::string mName;
RetCode handleStartStop(bool stop);
diff --git a/audio/aidl/default/include/effect-impl/EffectUUID.h b/audio/aidl/default/include/effect-impl/EffectUUID.h
index 267f6af..bc61c0f 100644
--- a/audio/aidl/default/include/effect-impl/EffectUUID.h
+++ b/audio/aidl/default/include/effect-impl/EffectUUID.h
@@ -273,12 +273,12 @@
0x4d34,
0xacaf,
{0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// fa819f3e-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xfa819f3e),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
+// 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,
diff --git a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp
index da02076..f115cc5 100644
--- a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp
+++ b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp
@@ -14,12 +14,10 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_LoudnessEnhancerSw"
-#include <Utils.h>
#include <algorithm>
-#include <unordered_set>
+#include <cstddef>
+#define LOG_TAG "AHAL_LoudnessEnhancerSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/main.cpp b/audio/aidl/default/main.cpp
index a861f9d..af71aa8 100644
--- a/audio/aidl/default/main.cpp
+++ b/audio/aidl/default/main.cpp
@@ -41,6 +41,9 @@
// android::base::SetMinimumLogSeverity(::android::base::VERBOSE);
ABinderProcess_setThreadPoolMaxThreadCount(16);
+ // Guaranteed log for b/210919187 and logd_integration_test
+ LOG(INFO) << "Init for Audio AIDL HAL";
+
// Make the default config service
auto config = ndk::SharedRefBase::make<Config>();
const std::string configName = std::string() + Config::descriptor + "/default";
diff --git a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
index 0ea31ea..ba39b16 100644
--- a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
+++ b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
@@ -17,10 +17,8 @@
#include <algorithm>
#include <cstddef>
#include <memory>
-#define LOG_TAG "AHAL_NoiseSuppressionSw"
-#include <Utils.h>
-#include <unordered_set>
+#define LOG_TAG "AHAL_NoiseSuppressionSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/presetReverb/PresetReverbSw.cpp b/audio/aidl/default/presetReverb/PresetReverbSw.cpp
index 2da3ff6..14546a4 100644
--- a/audio/aidl/default/presetReverb/PresetReverbSw.cpp
+++ b/audio/aidl/default/presetReverb/PresetReverbSw.cpp
@@ -14,12 +14,10 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_PresetReverbSw"
-#include <Utils.h>
#include <algorithm>
-#include <unordered_set>
+#include <cstddef>
+#define LOG_TAG "AHAL_PresetReverbSw"
#include <android-base/logging.h>
#include <android/binder_enums.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/default/usb/ModuleUsb.cpp b/audio/aidl/default/usb/ModuleUsb.cpp
index e803420..80b0a5b 100644
--- a/audio/aidl/default/usb/ModuleUsb.cpp
+++ b/audio/aidl/default/usb/ModuleUsb.cpp
@@ -22,6 +22,7 @@
#include <android-base/logging.h>
#include <tinyalsa/asoundlib.h>
+#include "UsbAlsaMixerControl.h"
#include "UsbAlsaUtils.h"
#include "core-impl/ModuleUsb.h"
@@ -29,6 +30,7 @@
#include "alsa_device_profile.h"
}
+using aidl::android::hardware::audio::common::isUsbInputDeviceType;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioDeviceAddress;
using aidl::android::media::audio::common::AudioDeviceDescription;
@@ -39,7 +41,6 @@
using aidl::android::media::audio::common::AudioPortConfig;
using aidl::android::media::audio::common::AudioPortExt;
using aidl::android::media::audio::common::AudioProfile;
-using android::hardware::audio::common::isUsbInputDeviceType;
namespace aidl::android::hardware::audio::core {
@@ -86,26 +87,6 @@
return ndk::ScopedAStatus::ok();
}
-ndk::ScopedAStatus ModuleUsb::getMasterMute(bool* _aidl_return __unused) {
- LOG(DEBUG) << __func__ << ": is not supported";
- return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
-}
-
-ndk::ScopedAStatus ModuleUsb::setMasterMute(bool in_mute __unused) {
- LOG(DEBUG) << __func__ << ": is not supported";
- return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
-}
-
-ndk::ScopedAStatus ModuleUsb::getMasterVolume(float* _aidl_return __unused) {
- LOG(DEBUG) << __func__ << ": is not supported";
- return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
-}
-
-ndk::ScopedAStatus ModuleUsb::setMasterVolume(float in_volume __unused) {
- LOG(DEBUG) << __func__ << ": is not supported";
- return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
-}
-
ndk::ScopedAStatus ModuleUsb::getMicMute(bool* _aidl_return __unused) {
LOG(DEBUG) << __func__ << ": is not supported";
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
@@ -180,4 +161,26 @@
return ndk::ScopedAStatus::ok();
}
+void ModuleUsb::onExternalDeviceConnectionChanged(
+ const ::aidl::android::media::audio::common::AudioPort& audioPort, bool connected) {
+ if (audioPort.ext.getTag() != AudioPortExt::Tag::device) {
+ return;
+ }
+ const auto& address = audioPort.ext.get<AudioPortExt::Tag::device>().device.address;
+ if (address.getTag() != AudioDeviceAddress::alsa) {
+ return;
+ }
+ const int card = address.get<AudioDeviceAddress::alsa>()[0];
+ usb::UsbAlsaMixerControl::getInstance().setDeviceConnectionState(card, mMasterMute,
+ mMasterVolume, connected);
+}
+
+ndk::ScopedAStatus ModuleUsb::onMasterMuteChanged(bool mute) {
+ return usb::UsbAlsaMixerControl::getInstance().setMasterMute(mute);
+}
+
+ndk::ScopedAStatus ModuleUsb::onMasterVolumeChanged(float volume) {
+ return usb::UsbAlsaMixerControl::getInstance().setMasterVolume(volume);
+}
+
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/usb/StreamUsb.cpp b/audio/aidl/default/usb/StreamUsb.cpp
index bd53a0e..fbfe0f1 100644
--- a/audio/aidl/default/usb/StreamUsb.cpp
+++ b/audio/aidl/default/usb/StreamUsb.cpp
@@ -17,6 +17,9 @@
#define LOG_TAG "AHAL_StreamUsb"
#include <android-base/logging.h>
+#include <Utils.h>
+
+#include "UsbAlsaMixerControl.h"
#include "UsbAlsaUtils.h"
#include "core-impl/Module.h"
#include "core-impl/StreamUsb.h"
@@ -25,13 +28,17 @@
#include "alsa_device_profile.h"
}
+using aidl::android::hardware::audio::common::getChannelCount;
using aidl::android::hardware::audio::common::SinkMetadata;
using aidl::android::hardware::audio::common::SourceMetadata;
using aidl::android::media::audio::common::AudioDevice;
using aidl::android::media::audio::common::AudioDeviceAddress;
using aidl::android::media::audio::common::AudioOffloadInfo;
+using aidl::android::media::audio::common::AudioPortExt;
using aidl::android::media::audio::common::MicrophoneDynamicInfo;
using aidl::android::media::audio::common::MicrophoneInfo;
+using android::OK;
+using android::status_t;
namespace aidl::android::hardware::audio::core {
@@ -239,6 +246,31 @@
// The default worker implementation is used.
return new StreamOutWorker(ctx, driver);
},
- offloadInfo) {}
+ offloadInfo) {
+ mChannelCount = getChannelCount(mContext.getChannelLayout());
+}
+
+ndk::ScopedAStatus StreamOutUsb::getHwVolume(std::vector<float>* _aidl_return) {
+ *_aidl_return = mHwVolumes;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus StreamOutUsb::setHwVolume(const std::vector<float>& in_channelVolumes) {
+ for (const auto& device : mConnectedDevices) {
+ if (device.address.getTag() != AudioDeviceAddress::alsa) {
+ LOG(DEBUG) << __func__ << ": skip as the device address is not alsa";
+ continue;
+ }
+ const int card = device.address.get<AudioDeviceAddress::alsa>()[0];
+ if (auto result =
+ usb::UsbAlsaMixerControl::getInstance().setVolumes(card, in_channelVolumes);
+ !result.isOk()) {
+ LOG(ERROR) << __func__ << ": failed to set volume for device, card=" << card;
+ return result;
+ }
+ }
+ mHwVolumes = in_channelVolumes;
+ return ndk::ScopedAStatus::ok();
+}
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/usb/UsbAlsaMixerControl.cpp b/audio/aidl/default/usb/UsbAlsaMixerControl.cpp
new file mode 100644
index 0000000..b5337d1
--- /dev/null
+++ b/audio/aidl/default/usb/UsbAlsaMixerControl.cpp
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "AHAL_UsbAlsaMixerControl"
+#include <android-base/logging.h>
+
+#include <cmath>
+#include <string>
+#include <vector>
+
+#include <android/binder_status.h>
+
+#include "UsbAlsaMixerControl.h"
+
+namespace aidl::android::hardware::audio::core::usb {
+
+//-----------------------------------------------------------------------------
+
+MixerControl::MixerControl(struct mixer_ctl* ctl)
+ : mCtl(ctl),
+ mNumValues(mixer_ctl_get_num_values(ctl)),
+ mMinValue(mixer_ctl_get_range_min(ctl)),
+ mMaxValue(mixer_ctl_get_range_max(ctl)) {}
+
+unsigned int MixerControl::getNumValues() const {
+ return mNumValues;
+}
+
+int MixerControl::getMaxValue() const {
+ return mMaxValue;
+}
+
+int MixerControl::getMinValue() const {
+ return mMinValue;
+}
+
+int MixerControl::setArray(const void* array, size_t count) {
+ const std::lock_guard guard(mLock);
+ return mixer_ctl_set_array(mCtl, array, count);
+}
+
+//-----------------------------------------------------------------------------
+
+// static
+const std::map<AlsaMixer::Control, std::vector<AlsaMixer::ControlNamesAndExpectedCtlType>>
+ AlsaMixer::kPossibleControls = {
+ {AlsaMixer::MASTER_SWITCH, {{"Master Playback Switch", MIXER_CTL_TYPE_BOOL}}},
+ {AlsaMixer::MASTER_VOLUME, {{"Master Playback Volume", MIXER_CTL_TYPE_INT}}},
+ {AlsaMixer::HW_VOLUME,
+ {{"Headphone Playback Volume", MIXER_CTL_TYPE_INT},
+ {"Headset Playback Volume", MIXER_CTL_TYPE_INT},
+ {"PCM Playback Volume", MIXER_CTL_TYPE_INT}}}};
+
+// static
+std::map<AlsaMixer::Control, std::shared_ptr<MixerControl>> AlsaMixer::initializeMixerControls(
+ struct mixer* mixer) {
+ std::map<AlsaMixer::Control, std::shared_ptr<MixerControl>> mixerControls;
+ std::string mixerCtlNames;
+ for (const auto& [control, possibleCtls] : kPossibleControls) {
+ for (const auto& [ctlName, expectedCtlType] : possibleCtls) {
+ struct mixer_ctl* ctl = mixer_get_ctl_by_name(mixer, ctlName.c_str());
+ if (ctl != nullptr && mixer_ctl_get_type(ctl) == expectedCtlType) {
+ mixerControls.emplace(control, std::make_unique<MixerControl>(ctl));
+ if (!mixerCtlNames.empty()) {
+ mixerCtlNames += ",";
+ }
+ mixerCtlNames += ctlName;
+ break;
+ }
+ }
+ }
+ LOG(DEBUG) << __func__ << ": available mixer control names=[" << mixerCtlNames << "]";
+ return mixerControls;
+}
+
+AlsaMixer::AlsaMixer(struct mixer* mixer)
+ : mMixer(mixer), mMixerControls(initializeMixerControls(mMixer)) {}
+
+AlsaMixer::~AlsaMixer() {
+ mixer_close(mMixer);
+}
+
+namespace {
+
+int volumeFloatToInteger(float fValue, int maxValue, int minValue) {
+ return minValue + std::ceil((maxValue - minValue) * fValue);
+}
+
+float volumeIntegerToFloat(int iValue, int maxValue, int minValue) {
+ if (iValue > maxValue) {
+ return 1.0f;
+ }
+ if (iValue < minValue) {
+ return 0.0f;
+ }
+ return static_cast<float>(iValue - minValue) / (maxValue - minValue);
+}
+
+} // namespace
+
+ndk::ScopedAStatus AlsaMixer::setMasterMute(bool muted) {
+ auto it = mMixerControls.find(AlsaMixer::MASTER_SWITCH);
+ if (it == mMixerControls.end()) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ const int numValues = it->second->getNumValues();
+ std::vector<int> values(numValues, muted ? 0 : 1);
+ if (int err = it->second->setArray(values.data(), numValues); err != 0) {
+ LOG(ERROR) << __func__ << ": failed to set master mute, err=" << err;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus AlsaMixer::setMasterVolume(float volume) {
+ auto it = mMixerControls.find(AlsaMixer::MASTER_VOLUME);
+ if (it == mMixerControls.end()) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ const int numValues = it->second->getNumValues();
+ std::vector<int> values(numValues, volumeFloatToInteger(volume, it->second->getMaxValue(),
+ it->second->getMinValue()));
+ if (int err = it->second->setArray(values.data(), numValues); err != 0) {
+ LOG(ERROR) << __func__ << ": failed to set master volume, err=" << err;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus AlsaMixer::setVolumes(std::vector<float> volumes) {
+ auto it = mMixerControls.find(AlsaMixer::HW_VOLUME);
+ if (it == mMixerControls.end()) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ const int numValues = it->second->getNumValues();
+ const int maxValue = it->second->getMaxValue();
+ const int minValue = it->second->getMinValue();
+ std::vector<int> values;
+ size_t i = 0;
+ for (; i < numValues && i < values.size(); ++i) {
+ values.emplace_back(volumeFloatToInteger(volumes[i], maxValue, minValue));
+ }
+ if (int err = it->second->setArray(values.data(), values.size()); err != 0) {
+ LOG(ERROR) << __func__ << ": failed to set volume, err=" << err;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+//-----------------------------------------------------------------------------
+
+// static
+UsbAlsaMixerControl& UsbAlsaMixerControl::getInstance() {
+ static UsbAlsaMixerControl gInstance;
+ return gInstance;
+}
+
+void UsbAlsaMixerControl::setDeviceConnectionState(int card, bool masterMuted, float masterVolume,
+ bool connected) {
+ LOG(DEBUG) << __func__ << ": card=" << card << ", connected=" << connected;
+ if (connected) {
+ struct mixer* mixer = mixer_open(card);
+ if (mixer == nullptr) {
+ PLOG(ERROR) << __func__ << ": failed to open mixer for card=" << card;
+ return;
+ }
+ auto alsaMixer = std::make_shared<AlsaMixer>(mixer);
+ alsaMixer->setMasterMute(masterMuted);
+ alsaMixer->setMasterVolume(masterVolume);
+ const std::lock_guard guard(mLock);
+ mMixerControls.emplace(card, alsaMixer);
+ } else {
+ const std::lock_guard guard(mLock);
+ mMixerControls.erase(card);
+ }
+}
+
+ndk::ScopedAStatus UsbAlsaMixerControl::setMasterMute(bool mute) {
+ auto alsaMixers = getAlsaMixers();
+ for (auto it = alsaMixers.begin(); it != alsaMixers.end(); ++it) {
+ if (auto result = it->second->setMasterMute(mute); !result.isOk()) {
+ // Return illegal state if there are multiple devices connected and one of them fails
+ // to set master mute. Otherwise, return the error from calling `setMasterMute`.
+ LOG(ERROR) << __func__ << ": failed to set master mute for card=" << it->first;
+ return alsaMixers.size() > 1 ? ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE)
+ : std::move(result);
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus UsbAlsaMixerControl::setMasterVolume(float volume) {
+ auto alsaMixers = getAlsaMixers();
+ for (auto it = alsaMixers.begin(); it != alsaMixers.end(); ++it) {
+ if (auto result = it->second->setMasterVolume(volume); !result.isOk()) {
+ // Return illegal state if there are multiple devices connected and one of them fails
+ // to set master volume. Otherwise, return the error from calling `setMasterVolume`.
+ LOG(ERROR) << __func__ << ": failed to set master volume for card=" << it->first;
+ return alsaMixers.size() > 1 ? ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE)
+ : std::move(result);
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus UsbAlsaMixerControl::setVolumes(int card, std::vector<float> volumes) {
+ auto alsaMixer = getAlsaMixer(card);
+ if (alsaMixer == nullptr) {
+ LOG(ERROR) << __func__ << ": no mixer control found for card=" << card;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ return alsaMixer->setVolumes(volumes);
+}
+
+std::shared_ptr<AlsaMixer> UsbAlsaMixerControl::getAlsaMixer(int card) {
+ const std::lock_guard guard(mLock);
+ const auto it = mMixerControls.find(card);
+ return it == mMixerControls.end() ? nullptr : it->second;
+}
+
+std::map<int, std::shared_ptr<AlsaMixer>> UsbAlsaMixerControl::getAlsaMixers() {
+ const std::lock_guard guard(mLock);
+ return mMixerControls;
+}
+
+} // namespace aidl::android::hardware::audio::core::usb
diff --git a/audio/aidl/default/usb/UsbAlsaMixerControl.h b/audio/aidl/default/usb/UsbAlsaMixerControl.h
new file mode 100644
index 0000000..cbcddd8
--- /dev/null
+++ b/audio/aidl/default/usb/UsbAlsaMixerControl.h
@@ -0,0 +1,106 @@
+/*
+ * 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 <map>
+#include <memory>
+#include <mutex>
+#include <optional>
+#include <string>
+#include <vector>
+
+#include <android-base/thread_annotations.h>
+#include <android/binder_auto_utils.h>
+
+extern "C" {
+#include <tinyalsa/mixer.h>
+}
+
+namespace aidl::android::hardware::audio::core::usb {
+
+class MixerControl {
+ public:
+ explicit MixerControl(struct mixer_ctl* ctl);
+
+ unsigned int getNumValues() const;
+ int getMaxValue() const;
+ int getMinValue() const;
+ int setArray(const void* array, size_t count);
+
+ private:
+ std::mutex mLock;
+ // The mixer_ctl object is owned by ALSA and will be released when the mixer is closed.
+ struct mixer_ctl* mCtl GUARDED_BY(mLock);
+ const unsigned int mNumValues;
+ const int mMinValue;
+ const int mMaxValue;
+};
+
+class AlsaMixer {
+ public:
+ explicit AlsaMixer(struct mixer* mixer);
+
+ ~AlsaMixer();
+
+ bool isValid() const { return mMixer != nullptr; }
+
+ ndk::ScopedAStatus setMasterMute(bool muted);
+ ndk::ScopedAStatus setMasterVolume(float volume);
+ ndk::ScopedAStatus setVolumes(std::vector<float> volumes);
+
+ private:
+ enum Control {
+ MASTER_SWITCH,
+ MASTER_VOLUME,
+ HW_VOLUME,
+ };
+ using ControlNamesAndExpectedCtlType = std::pair<std::string, enum mixer_ctl_type>;
+ static const std::map<Control, std::vector<ControlNamesAndExpectedCtlType>> kPossibleControls;
+ static std::map<Control, std::shared_ptr<MixerControl>> initializeMixerControls(
+ struct mixer* mixer);
+
+ // The mixer object is owned by ALSA and will be released when the mixer is closed.
+ struct mixer* mMixer;
+ // `mMixerControls` will only be initialized in constructor. After that, it wil only be
+ // read but not be modified.
+ const std::map<Control, std::shared_ptr<MixerControl>> mMixerControls;
+};
+
+class UsbAlsaMixerControl {
+ public:
+ static UsbAlsaMixerControl& getInstance();
+
+ void setDeviceConnectionState(int card, bool masterMuted, float masterVolume, bool connected);
+
+ // Master volume settings will be applied to all sound cards, it is only set by the
+ // USB module.
+ ndk::ScopedAStatus setMasterMute(bool muted);
+ ndk::ScopedAStatus setMasterVolume(float volume);
+ // The volume settings can be different on sound cards. It is controlled by streams.
+ ndk::ScopedAStatus setVolumes(int card, std::vector<float> volumes);
+
+ private:
+ std::shared_ptr<AlsaMixer> getAlsaMixer(int card);
+ std::map<int, std::shared_ptr<AlsaMixer>> getAlsaMixers();
+
+ std::mutex mLock;
+ // A map whose key is the card number and value is a shared pointer to corresponding
+ // AlsaMixer object.
+ std::map<int, std::shared_ptr<AlsaMixer>> mMixerControls GUARDED_BY(mLock);
+};
+
+} // namespace aidl::android::hardware::audio::core::usb
diff --git a/audio/aidl/default/usb/UsbAlsaUtils.cpp b/audio/aidl/default/usb/UsbAlsaUtils.cpp
index 3c79e1d..3a74c2a 100644
--- a/audio/aidl/default/usb/UsbAlsaUtils.cpp
+++ b/audio/aidl/default/usb/UsbAlsaUtils.cpp
@@ -24,11 +24,11 @@
#include "UsbAlsaUtils.h"
#include "core-impl/utils.h"
+using aidl::android::hardware::audio::common::getChannelCount;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioFormatDescription;
using aidl::android::media::audio::common::AudioFormatType;
using aidl::android::media::audio::common::PcmType;
-using android::hardware::audio::common::getChannelCount;
namespace aidl::android::hardware::audio::core::usb {
@@ -178,4 +178,4 @@
return findValueOrDefault(getAudioFormatDescriptorToPcmFormatMap(), aidl, PCM_FORMAT_INVALID);
}
-} // namespace aidl::android::hardware::audio::core::usb
\ No newline at end of file
+} // namespace aidl::android::hardware::audio::core::usb
diff --git a/audio/aidl/default/virtualizer/VirtualizerSw.cpp b/audio/aidl/default/virtualizer/VirtualizerSw.cpp
index 5e99cba2..c5a0e8d 100644
--- a/audio/aidl/default/virtualizer/VirtualizerSw.cpp
+++ b/audio/aidl/default/virtualizer/VirtualizerSw.cpp
@@ -14,12 +14,11 @@
* limitations under the License.
*/
+#include <algorithm>
#include <cstddef>
+
#define LOG_TAG "AHAL_VirtualizerSw"
#include <Utils.h>
-#include <algorithm>
-#include <unordered_set>
-
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
@@ -68,11 +67,7 @@
MAKE_RANGE(Virtualizer, strengthPm, 0, 1000),
/* speakerAngle is get-only, set min > max */
MAKE_RANGE(Virtualizer, speakerAngles, {Virtualizer::ChannelAngle({.channel = 1})},
- {Virtualizer::ChannelAngle({.channel = 0})}),
- /* device is get-only */
- MAKE_RANGE(Virtualizer, device,
- AudioDeviceDescription({.type = AudioDeviceType::IN_DEFAULT}),
- AudioDeviceDescription({.type = AudioDeviceType::NONE}))};
+ {Virtualizer::ChannelAngle({.channel = 0})})};
const Capability VirtualizerSw::kCapability = {
.range = Range::make<Range::virtualizer>(VirtualizerSw::kRanges)};
@@ -174,17 +169,21 @@
ndk::ScopedAStatus VirtualizerSw::getSpeakerAngles(const Virtualizer::SpeakerAnglesPayload payload,
Parameter::Specific* specific) {
std::vector<Virtualizer::ChannelAngle> angles;
- if (::android::hardware::audio::common::getChannelCount(payload.layout) == 1) {
+ const auto chNum = ::aidl::android::hardware::audio::common::getChannelCount(payload.layout);
+ if (chNum == 1) {
angles = {{.channel = (int32_t)AudioChannelLayout::CHANNEL_FRONT_LEFT,
.azimuthDegree = 0,
.elevationDegree = 0}};
- } else {
+ } else if (chNum == 2) {
angles = {{.channel = (int32_t)AudioChannelLayout::CHANNEL_FRONT_LEFT,
.azimuthDegree = -90,
.elevationDegree = 0},
{.channel = (int32_t)AudioChannelLayout::CHANNEL_FRONT_RIGHT,
.azimuthDegree = 90,
.elevationDegree = 0}};
+ } else {
+ return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
+ "supportUpTo2Ch");
}
Virtualizer param = Virtualizer::make<Virtualizer::speakerAngles>(angles);
diff --git a/audio/aidl/default/volume/VolumeSw.cpp b/audio/aidl/default/volume/VolumeSw.cpp
index 796c332..44cac44 100644
--- a/audio/aidl/default/volume/VolumeSw.cpp
+++ b/audio/aidl/default/volume/VolumeSw.cpp
@@ -14,12 +14,10 @@
* limitations under the License.
*/
-#include <cstddef>
-#define LOG_TAG "AHAL_VolumeSw"
-#include <Utils.h>
#include <algorithm>
-#include <unordered_set>
+#include <cstddef>
+#define LOG_TAG "AHAL_VolumeSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index 5ed8e1f..a128f7c 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -23,11 +23,13 @@
#include <unordered_map>
#include <vector>
+#include <Utils.h>
#include <aidl/android/hardware/audio/effect/IEffect.h>
#include <aidl/android/hardware/audio/effect/IFactory.h>
#include <aidl/android/media/audio/common/AudioChannelLayout.h>
#include <android/binder_auto_utils.h>
#include <fmq/AidlMessageQueue.h>
+#include <gtest/gtest.h>
#include <system/audio_effects/aidl_effects_utils.h>
#include "AudioHalBinderServiceUtil.h"
@@ -134,7 +136,7 @@
static void allocateInputData(const Parameter::Common common, std::unique_ptr<DataMQ>& mq,
std::vector<float>& buffer) {
ASSERT_NE(mq, nullptr);
- auto frameSize = android::hardware::audio::common::getFrameSizeInBytes(
+ auto frameSize = ::aidl::android::hardware::audio::common::getFrameSizeInBytes(
common.input.base.format, common.input.base.channelMask);
const size_t floatsToWrite = mq->availableToWrite();
ASSERT_NE(0UL, floatsToWrite);
diff --git a/audio/aidl/vts/ModuleConfig.cpp b/audio/aidl/vts/ModuleConfig.cpp
index 7b002ad..8c448a8 100644
--- a/audio/aidl/vts/ModuleConfig.cpp
+++ b/audio/aidl/vts/ModuleConfig.cpp
@@ -27,6 +27,7 @@
using namespace android;
using namespace std::chrono_literals;
+using aidl::android::hardware::audio::common::isBitPositionFlagSet;
using aidl::android::hardware::audio::core::IModule;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioDeviceType;
@@ -43,7 +44,6 @@
using aidl::android::media::audio::common::AudioProfile;
using aidl::android::media::audio::common::AudioUsage;
using aidl::android::media::audio::common::Int;
-using android::hardware::audio::common::isBitPositionFlagSet;
// static
std::optional<AudioOffloadInfo> ModuleConfig::generateOffloadInfoIfNeeded(
@@ -56,7 +56,7 @@
offloadInfo.base.sampleRate = portConfig.sampleRate.value().value;
offloadInfo.base.channelMask = portConfig.channelMask.value();
offloadInfo.base.format = portConfig.format.value();
- offloadInfo.bitRatePerSecond = 256; // Arbitrary value.
+ offloadInfo.bitRatePerSecond = 256000; // Arbitrary value.
offloadInfo.durationUs = std::chrono::microseconds(1min).count(); // Arbitrary value.
offloadInfo.usage = AudioUsage::MEDIA;
offloadInfo.encapsulationMode = AudioEncapsulationMode::NONE;
diff --git a/audio/aidl/vts/TestUtils.h b/audio/aidl/vts/TestUtils.h
index 4c1d42c..72ca56f 100644
--- a/audio/aidl/vts/TestUtils.h
+++ b/audio/aidl/vts/TestUtils.h
@@ -21,7 +21,7 @@
#include <iostream>
#include <android/binder_auto_utils.h>
-#include <gtest/gtest_pred_impl.h>
+#include <gtest/gtest.h>
namespace android::hardware::audio::common::testing {
diff --git a/audio/aidl/vts/VtsHalAECTargetTest.cpp b/audio/aidl/vts/VtsHalAECTargetTest.cpp
index 39be191..2d36cbb 100644
--- a/audio/aidl/vts/VtsHalAECTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAECTargetTest.cpp
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-#include <Utils.h>
-#include <aidl/Vintf.h>
#include <algorithm>
#include <string>
#include <unordered_set>
+#include <aidl/Vintf.h>
#define LOG_TAG "VtsHalAECParamTest"
+#include <android-base/logging.h>
#include "EffectHelper.h"
#include "effect-impl/EffectTypes.h"
@@ -177,4 +177,4 @@
ABinderProcess_setThreadPoolMaxThreadCount(1);
ABinderProcess_startThreadPool();
return RUN_ALL_TESTS();
-}
\ No newline at end of file
+}
diff --git a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
index a6fc1aa..15a9374 100644
--- a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
@@ -14,10 +14,9 @@
* limitations under the License.
*/
-#include <Utils.h>
#include <aidl/Vintf.h>
-
#define LOG_TAG "VtsHalAGC1ParamTest"
+#include <android-base/logging.h>
#include "EffectHelper.h"
diff --git a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
index fd3a866..140537e 100644
--- a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
@@ -14,12 +14,10 @@
* limitations under the License.
*/
-#include <Utils.h>
#include <aidl/Vintf.h>
-#include <android/binder_enums.h>
-#include <unordered_set>
-
#define LOG_TAG "VtsHalAGC2ParamTest"
+#include <android-base/logging.h>
+#include <android/binder_enums.h>
#include "EffectHelper.h"
@@ -200,4 +198,4 @@
ABinderProcess_setThreadPoolMaxThreadCount(1);
ABinderProcess_startThreadPool();
return RUN_ALL_TESTS();
-}
\ No newline at end of file
+}
diff --git a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
index e7f5817..e5e06eb 100644
--- a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
@@ -1,17 +1,32 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
-#define LOG_TAG "VtsHalAudioCore.Config"
-
-#include <Utils.h>
#include <aidl/Gtest.h>
#include <aidl/Vintf.h>
#include <aidl/android/hardware/audio/core/IConfig.h>
#include <aidl/android/media/audio/common/AudioFlag.h>
#include <aidl/android/media/audio/common/AudioProductStrategyType.h>
+#define LOG_TAG "VtsHalAudioCore.Config"
+#include <android-base/logging.h>
#include "AudioHalBinderServiceUtil.h"
#include "TestUtils.h"
diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
index 1222fd5..e790d4f 100644
--- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
@@ -53,6 +53,11 @@
#include "TestUtils.h"
using namespace android;
+using aidl::android::hardware::audio::common::AudioOffloadMetadata;
+using aidl::android::hardware::audio::common::getChannelCount;
+using aidl::android::hardware::audio::common::isBitPositionFlagSet;
+using aidl::android::hardware::audio::common::isTelephonyDeviceType;
+using aidl::android::hardware::audio::common::isValidAudioMode;
using aidl::android::hardware::audio::common::PlaybackTrackMetadata;
using aidl::android::hardware::audio::common::RecordTrackMetadata;
using aidl::android::hardware::audio::common::SinkMetadata;
@@ -60,6 +65,8 @@
using aidl::android::hardware::audio::core::AudioPatch;
using aidl::android::hardware::audio::core::AudioRoute;
using aidl::android::hardware::audio::core::IBluetooth;
+using aidl::android::hardware::audio::core::IBluetoothA2dp;
+using aidl::android::hardware::audio::core::IBluetoothLe;
using aidl::android::hardware::audio::core::IModule;
using aidl::android::hardware::audio::core::IStreamCommon;
using aidl::android::hardware::audio::core::IStreamIn;
@@ -88,6 +95,7 @@
using aidl::android::media::audio::common::AudioPortConfig;
using aidl::android::media::audio::common::AudioPortDeviceExt;
using aidl::android::media::audio::common::AudioPortExt;
+using aidl::android::media::audio::common::AudioPortMixExt;
using aidl::android::media::audio::common::AudioSource;
using aidl::android::media::audio::common::AudioUsage;
using aidl::android::media::audio::common::Boolean;
@@ -96,10 +104,6 @@
using aidl::android::media::audio::common::MicrophoneDynamicInfo;
using aidl::android::media::audio::common::MicrophoneInfo;
using aidl::android::media::audio::common::Void;
-using android::hardware::audio::common::getChannelCount;
-using android::hardware::audio::common::isBitPositionFlagSet;
-using android::hardware::audio::common::isTelephonyDeviceType;
-using android::hardware::audio::common::isValidAudioMode;
using android::hardware::audio::common::StreamLogic;
using android::hardware::audio::common::StreamWorker;
using ndk::enum_range;
@@ -400,8 +404,9 @@
// Can be used as a base for any test here, does not depend on the fixture GTest parameters.
class AudioCoreModuleBase {
public:
- // The default buffer size is used mostly for negative tests.
+ // Default buffer sizes are used mostly for negative tests.
static constexpr int kDefaultBufferSizeFrames = 256;
+ static constexpr int kDefaultLargeBufferSizeFrames = 48000;
void SetUpImpl(const std::string& moduleName) {
ASSERT_NO_FATAL_FAILURE(ConnectToService(moduleName));
@@ -1066,6 +1071,8 @@
std::shared_ptr<IStreamCommon> common;
ndk::ScopedAStatus status = stream->getStreamCommon(&common);
if (!status.isOk()) return status;
+ status = common->prepareToClose();
+ if (!status.isOk()) return status;
return common->close();
}
@@ -1524,6 +1531,8 @@
AudioPortConfig portConfig;
AudioPortConfig suggestedConfig;
portConfig.portId = srcMixPort.value().id;
+ const int32_t kIoHandle = 42;
+ portConfig.ext = AudioPortMixExt{.handle = kIoHandle};
{
bool applied = true;
ASSERT_IS_OK(module->setAudioPortConfig(portConfig, &suggestedConfig, &applied))
@@ -1535,18 +1544,22 @@
EXPECT_TRUE(suggestedConfig.channelMask.has_value());
EXPECT_TRUE(suggestedConfig.format.has_value());
EXPECT_TRUE(suggestedConfig.flags.has_value());
+ ASSERT_EQ(AudioPortExt::Tag::mix, suggestedConfig.ext.getTag());
+ EXPECT_EQ(kIoHandle, suggestedConfig.ext.get<AudioPortExt::Tag::mix>().handle);
WithAudioPortConfig applied(suggestedConfig);
ASSERT_NO_FATAL_FAILURE(applied.SetUp(module.get()));
const AudioPortConfig& appliedConfig = applied.get();
EXPECT_NE(0, appliedConfig.id);
- EXPECT_TRUE(appliedConfig.sampleRate.has_value());
+ ASSERT_TRUE(appliedConfig.sampleRate.has_value());
EXPECT_EQ(suggestedConfig.sampleRate.value(), appliedConfig.sampleRate.value());
- EXPECT_TRUE(appliedConfig.channelMask.has_value());
+ ASSERT_TRUE(appliedConfig.channelMask.has_value());
EXPECT_EQ(suggestedConfig.channelMask.value(), appliedConfig.channelMask.value());
- EXPECT_TRUE(appliedConfig.format.has_value());
+ ASSERT_TRUE(appliedConfig.format.has_value());
EXPECT_EQ(suggestedConfig.format.value(), appliedConfig.format.value());
- EXPECT_TRUE(appliedConfig.flags.has_value());
+ ASSERT_TRUE(appliedConfig.flags.has_value());
EXPECT_EQ(suggestedConfig.flags.value(), appliedConfig.flags.value());
+ ASSERT_EQ(AudioPortExt::Tag::mix, appliedConfig.ext.getTag());
+ EXPECT_EQ(kIoHandle, appliedConfig.ext.get<AudioPortExt::Tag::mix>().handle);
}
TEST_P(AudioCoreModule, SetAllAttachedDevicePortConfigs) {
@@ -2046,6 +2059,112 @@
&hfpConfig));
}
+class AudioCoreBluetoothA2dp : public AudioCoreModuleBase,
+ public testing::TestWithParam<std::string> {
+ public:
+ void SetUp() override {
+ ASSERT_NO_FATAL_FAILURE(SetUpImpl(GetParam()));
+ ASSERT_IS_OK(module->getBluetoothA2dp(&bluetooth));
+ }
+
+ void TearDown() override { ASSERT_NO_FATAL_FAILURE(TearDownImpl()); }
+
+ std::shared_ptr<IBluetoothA2dp> bluetooth;
+};
+
+TEST_P(AudioCoreBluetoothA2dp, SameInstance) {
+ if (bluetooth == nullptr) {
+ GTEST_SKIP() << "BluetoothA2dp is not supported";
+ }
+ std::shared_ptr<IBluetoothA2dp> bluetooth2;
+ EXPECT_IS_OK(module->getBluetoothA2dp(&bluetooth2));
+ ASSERT_NE(nullptr, bluetooth2.get());
+ EXPECT_EQ(bluetooth->asBinder(), bluetooth2->asBinder())
+ << "getBluetoothA2dp must return the same interface instance across invocations";
+}
+
+TEST_P(AudioCoreBluetoothA2dp, Enabled) {
+ if (bluetooth == nullptr) {
+ GTEST_SKIP() << "BluetoothA2dp is not supported";
+ }
+ // Since enabling A2DP may require having an actual device connection,
+ // limit testing to setting back the current value.
+ bool enabled;
+ ASSERT_IS_OK(bluetooth->isEnabled(&enabled));
+ EXPECT_IS_OK(bluetooth->setEnabled(enabled))
+ << "setEnabled without actual state change must not fail";
+}
+
+TEST_P(AudioCoreBluetoothA2dp, OffloadReconfiguration) {
+ if (bluetooth == nullptr) {
+ GTEST_SKIP() << "BluetoothA2dp is not supported";
+ }
+ bool isSupported;
+ ASSERT_IS_OK(bluetooth->supportsOffloadReconfiguration(&isSupported));
+ bool isSupported2;
+ ASSERT_IS_OK(bluetooth->supportsOffloadReconfiguration(&isSupported2));
+ EXPECT_EQ(isSupported, isSupported2);
+ if (isSupported) {
+ static const auto kStatuses = {EX_NONE, EX_ILLEGAL_STATE};
+ EXPECT_STATUS(kStatuses, bluetooth->reconfigureOffload({}));
+ } else {
+ EXPECT_STATUS(EX_UNSUPPORTED_OPERATION, bluetooth->reconfigureOffload({}));
+ }
+}
+
+class AudioCoreBluetoothLe : public AudioCoreModuleBase,
+ public testing::TestWithParam<std::string> {
+ public:
+ void SetUp() override {
+ ASSERT_NO_FATAL_FAILURE(SetUpImpl(GetParam()));
+ ASSERT_IS_OK(module->getBluetoothLe(&bluetooth));
+ }
+
+ void TearDown() override { ASSERT_NO_FATAL_FAILURE(TearDownImpl()); }
+
+ std::shared_ptr<IBluetoothLe> bluetooth;
+};
+
+TEST_P(AudioCoreBluetoothLe, SameInstance) {
+ if (bluetooth == nullptr) {
+ GTEST_SKIP() << "BluetoothLe is not supported";
+ }
+ std::shared_ptr<IBluetoothLe> bluetooth2;
+ EXPECT_IS_OK(module->getBluetoothLe(&bluetooth2));
+ ASSERT_NE(nullptr, bluetooth2.get());
+ EXPECT_EQ(bluetooth->asBinder(), bluetooth2->asBinder())
+ << "getBluetoothLe must return the same interface instance across invocations";
+}
+
+TEST_P(AudioCoreBluetoothLe, Enabled) {
+ if (bluetooth == nullptr) {
+ GTEST_SKIP() << "BluetoothLe is not supported";
+ }
+ // Since enabling LE may require having an actual device connection,
+ // limit testing to setting back the current value.
+ bool enabled;
+ ASSERT_IS_OK(bluetooth->isEnabled(&enabled));
+ EXPECT_IS_OK(bluetooth->setEnabled(enabled))
+ << "setEnabled without actual state change must not fail";
+}
+
+TEST_P(AudioCoreBluetoothLe, OffloadReconfiguration) {
+ if (bluetooth == nullptr) {
+ GTEST_SKIP() << "BluetoothLe is not supported";
+ }
+ bool isSupported;
+ ASSERT_IS_OK(bluetooth->supportsOffloadReconfiguration(&isSupported));
+ bool isSupported2;
+ ASSERT_IS_OK(bluetooth->supportsOffloadReconfiguration(&isSupported2));
+ EXPECT_EQ(isSupported, isSupported2);
+ if (isSupported) {
+ static const auto kStatuses = {EX_NONE, EX_ILLEGAL_STATE};
+ EXPECT_STATUS(kStatuses, bluetooth->reconfigureOffload({}));
+ } else {
+ EXPECT_STATUS(EX_UNSUPPORTED_OPERATION, bluetooth->reconfigureOffload({}));
+ }
+}
+
class AudioCoreTelephony : public AudioCoreModuleBase, public testing::TestWithParam<std::string> {
public:
void SetUp() override {
@@ -2239,6 +2358,26 @@
<< "when closing the stream twice";
}
+ void PrepareToCloseTwice() {
+ const auto portConfig = moduleConfig->getSingleConfigForMixPort(IOTraits<Stream>::is_input);
+ if (!portConfig.has_value()) {
+ GTEST_SKIP() << "No mix port for attached devices";
+ }
+ std::shared_ptr<IStreamCommon> heldStreamCommon;
+ {
+ WithStream<Stream> stream(portConfig.value());
+ ASSERT_NO_FATAL_FAILURE(stream.SetUp(module.get(), kDefaultBufferSizeFrames));
+ std::shared_ptr<IStreamCommon> streamCommon;
+ ASSERT_IS_OK(stream.get()->getStreamCommon(&streamCommon));
+ heldStreamCommon = streamCommon;
+ EXPECT_IS_OK(streamCommon->prepareToClose());
+ EXPECT_IS_OK(streamCommon->prepareToClose())
+ << "when calling prepareToClose second time";
+ }
+ EXPECT_STATUS(EX_ILLEGAL_STATE, heldStreamCommon->prepareToClose())
+ << "when calling prepareToClose on a closed stream";
+ }
+
void OpenAllConfigs() {
const auto allPortConfigs =
moduleConfig->getPortConfigsForMixPorts(IOTraits<Stream>::is_input);
@@ -2534,6 +2673,7 @@
}
TEST_IN_AND_OUT_STREAM(CloseTwice);
+TEST_IN_AND_OUT_STREAM(PrepareToCloseTwice);
TEST_IN_AND_OUT_STREAM(GetStreamCommon);
TEST_IN_AND_OUT_STREAM(OpenAllConfigs);
TEST_IN_AND_OUT_STREAM(OpenInvalidBufferSize);
@@ -2689,7 +2829,7 @@
aidl::android::hardware::audio::core::IModule::OpenOutputStreamArguments args;
args.portConfigId = portConfig.getId();
args.sourceMetadata = GenerateSourceMetadata(portConfig.get());
- args.bufferSizeFrames = kDefaultBufferSizeFrames;
+ args.bufferSizeFrames = kDefaultLargeBufferSizeFrames;
aidl::android::hardware::audio::core::IModule::OpenOutputStreamReturn ret;
EXPECT_STATUS(EX_ILLEGAL_ARGUMENT, module->openOutputStream(args, &ret))
<< "when no offload info is provided for a compressed offload mix port";
@@ -2869,7 +3009,7 @@
const auto portConfig = moduleConfig->getSingleConfigForMixPort(false, port);
ASSERT_TRUE(portConfig.has_value()) << "No profiles specified for output mix port";
WithStream<IStreamOut> stream(portConfig.value());
- ASSERT_NO_FATAL_FAILURE(stream.SetUp(module.get(), kDefaultBufferSizeFrames));
+ ASSERT_NO_FATAL_FAILURE(stream.SetUp(module.get(), kDefaultLargeBufferSizeFrames));
bool isSupported = false;
EXPECT_NO_FATAL_FAILURE(TestAccessors<AudioPlaybackRate>(
stream.get(), &IStreamOut::getPlaybackRateParameters,
@@ -2894,7 +3034,7 @@
const auto portConfig = moduleConfig->getSingleConfigForMixPort(false, port);
ASSERT_TRUE(portConfig.has_value()) << "No profiles specified for output mix port";
WithStream<IStreamOut> stream(portConfig.value());
- ASSERT_NO_FATAL_FAILURE(stream.SetUp(module.get(), kDefaultBufferSizeFrames));
+ ASSERT_NO_FATAL_FAILURE(stream.SetUp(module.get(), kDefaultLargeBufferSizeFrames));
ndk::ScopedAStatus status;
EXPECT_STATUS(kStatuses, status = stream.get()->selectPresentation(0, 0));
if (status.getExceptionCode() != EX_UNSUPPORTED_OPERATION) atLeastOneSupports = true;
@@ -2904,6 +3044,33 @@
}
}
+TEST_P(AudioStreamOut, UpdateOffloadMetadata) {
+ const auto offloadMixPorts =
+ moduleConfig->getOffloadMixPorts(true /*attachedOnly*/, false /*singlePort*/);
+ if (offloadMixPorts.empty()) {
+ GTEST_SKIP()
+ << "No mix port for compressed offload that could be routed to attached devices";
+ }
+ for (const auto& port : offloadMixPorts) {
+ const auto portConfig = moduleConfig->getSingleConfigForMixPort(false, port);
+ ASSERT_TRUE(portConfig.has_value()) << "No profiles specified for output mix port";
+ WithStream<IStreamOut> stream(portConfig.value());
+ ASSERT_NO_FATAL_FAILURE(stream.SetUp(module.get(), kDefaultLargeBufferSizeFrames));
+ AudioOffloadMetadata validMetadata{
+ .sampleRate = portConfig.value().sampleRate.value().value,
+ .channelMask = portConfig.value().channelMask.value(),
+ .averageBitRatePerSecond = 256000,
+ .delayFrames = 0,
+ .paddingFrames = 0};
+ EXPECT_IS_OK(stream.get()->updateOffloadMetadata(validMetadata));
+ AudioOffloadMetadata invalidMetadata{.sampleRate = -1,
+ .averageBitRatePerSecond = -1,
+ .delayFrames = -1,
+ .paddingFrames = -1};
+ EXPECT_STATUS(EX_ILLEGAL_ARGUMENT, stream.get()->updateOffloadMetadata(invalidMetadata));
+ }
+}
+
class StreamLogicDefaultDriver : public StreamLogicDriver {
public:
StreamLogicDefaultDriver(std::shared_ptr<StateSequence> commands, size_t frameSizeBytes)
@@ -3376,26 +3543,27 @@
<< "getSoundDose must return the same interface instance across invocations";
}
-TEST_P(AudioCoreSoundDose, GetSetOutputRs2) {
+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) {
+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);
}
@@ -3426,6 +3594,14 @@
testing::ValuesIn(android::getAidlHalInstanceNames(IModule::descriptor)),
android::PrintInstanceNameToString);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioCoreBluetooth);
+INSTANTIATE_TEST_SUITE_P(AudioCoreBluetoothA2dpTest, AudioCoreBluetoothA2dp,
+ testing::ValuesIn(android::getAidlHalInstanceNames(IModule::descriptor)),
+ android::PrintInstanceNameToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioCoreBluetoothA2dp);
+INSTANTIATE_TEST_SUITE_P(AudioCoreBluetoothLeTest, AudioCoreBluetoothLe,
+ testing::ValuesIn(android::getAidlHalInstanceNames(IModule::descriptor)),
+ android::PrintInstanceNameToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioCoreBluetoothLe);
INSTANTIATE_TEST_SUITE_P(AudioCoreTelephonyTest, AudioCoreTelephony,
testing::ValuesIn(android::getAidlHalInstanceNames(IModule::descriptor)),
android::PrintInstanceNameToString);
diff --git a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
index 947d30e..df66bd3 100644
--- a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
@@ -21,7 +21,6 @@
#include <string>
#include <vector>
-#include <Utils.h>
#include <aidl/Gtest.h>
#include <aidl/Vintf.h>
#include <aidl/android/hardware/audio/effect/IEffect.h>
diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
index a1862d2..824bd9f 100644
--- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#define LOG_TAG "VtsHalBassBoostTest"
-
-#include <Utils.h>
-#include <aidl/Vintf.h>
#include <limits.h>
+#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalBassBoostTest"
+#include <android-base/logging.h>
+
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
index 0601cc4..bd3b76b 100644
--- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#define LOG_TAG "VtsHalDownmixTargetTest"
-
-#include <Utils.h>
#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalDownmixTargetTest"
+#include <android-base/logging.h>
+
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index ece07f0..0b05b17 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include <aidl/Vintf.h>
-
-#define LOG_TAG "VtsHalDynamicsProcessingTest"
-
#include <set>
#include <string>
-#include <unordered_map>
#include <unordered_set>
+#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalDynamicsProcessingTest"
+#include <android-base/logging.h>
+
#include <Utils.h>
+
#include "EffectHelper.h"
using namespace android;
@@ -45,7 +45,7 @@
int32_t channelLayOut = AudioChannelLayout::LAYOUT_STEREO) {
std::tie(mFactory, mDescriptor) = pair;
mChannelLayout = channelLayOut;
- mChannelCount = ::android::hardware::audio::common::getChannelCount(
+ mChannelCount = ::aidl::android::hardware::audio::common::getChannelCount(
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout));
}
@@ -224,7 +224,7 @@
dpRef.get<DynamicsProcessing::inputGain>(),
dpTest.get<DynamicsProcessing::inputGain>());
}
- case DynamicsProcessing::vendorExtension: {
+ case DynamicsProcessing::vendor: {
return false;
}
}
diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
index fea41cb..a2deb7c 100644
--- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
@@ -14,11 +14,10 @@
* limitations under the License.
*/
-#define LOG_TAG "VtsHalEnvironmentalReverbTest"
-
-#include <Utils.h>
#include <aidl/Vintf.h>
-#include <unordered_set>
+#define LOG_TAG "VtsHalEnvironmentalReverbTest"
+#include <android-base/logging.h>
+
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
index 54d00a7..9beb0a7 100644
--- a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
@@ -22,10 +22,11 @@
#include <string>
#include <vector>
-#define LOG_TAG "VtsHalEqualizerTest"
-
#include <aidl/Gtest.h>
#include <aidl/Vintf.h>
+#include <aidl/android/hardware/audio/effect/IEffect.h>
+#include <aidl/android/hardware/audio/effect/IFactory.h>
+#define LOG_TAG "VtsHalEqualizerTest"
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android/binder_interface_utils.h>
@@ -33,10 +34,6 @@
#include <android/binder_process.h>
#include <gtest/gtest.h>
-#include <Utils.h>
-#include <aidl/android/hardware/audio/effect/IEffect.h>
-#include <aidl/android/hardware/audio/effect/IFactory.h>
-
#include "AudioHalBinderServiceUtil.h"
#include "EffectHelper.h"
#include "TestUtils.h"
diff --git a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
index 6c3016e..32ebc4f 100644
--- a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-#define LOG_TAG "VtsHalHapticGeneratorTargetTest"
-
-#include <Utils.h>
-#include <aidl/Vintf.h>
-#include <android/binder_enums.h>
#include <map>
#include <utility>
#include <vector>
+#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalHapticGeneratorTargetTest"
+#include <android-base/logging.h>
+#include <android/binder_enums.h>
+
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
index 75941ff..5faf7f4 100644
--- a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#include <aidl/Vintf.h>
#include <string>
+#include <aidl/Vintf.h>
#define LOG_TAG "VtsHalLoudnessEnhancerTest"
+#include <android-base/logging.h>
-#include <Utils.h>
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/aidl/vts/VtsHalNSTargetTest.cpp b/audio/aidl/vts/VtsHalNSTargetTest.cpp
index 16c79e3..4fcda6b 100644
--- a/audio/aidl/vts/VtsHalNSTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalNSTargetTest.cpp
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-#include <Utils.h>
-#include <aidl/Vintf.h>
-#include <android/binder_enums.h>
#include <unordered_set>
-#define LOG_TAG "VtsHalNSParamTest"
-
+#include <aidl/Vintf.h>
#include <aidl/android/hardware/audio/effect/NoiseSuppression.h>
+#define LOG_TAG "VtsHalNSParamTest"
+#include <android-base/logging.h>
+#include <android/binder_enums.h>
+
#include "EffectHelper.h"
using namespace android;
@@ -171,4 +171,4 @@
ABinderProcess_setThreadPoolMaxThreadCount(1);
ABinderProcess_startThreadPool();
return RUN_ALL_TESTS();
-}
\ No newline at end of file
+}
diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
index c9c2a31..7bce9c3 100644
--- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-#define LOG_TAG "VtsHalPresetReverbTargetTest"
-
-#include <Utils.h>
#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalPresetReverbTargetTest"
+#include <android-base/logging.h>
#include <android/binder_enums.h>
+
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
index 8b0210c..84b980f 100644
--- a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#define LOG_TAG "VtsHalVirtualizerTest"
-
-#include <Utils.h>
#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalVirtualizerTest"
+#include <android-base/logging.h>
+
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
index e2625cb..e273824 100644
--- a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
@@ -14,14 +14,13 @@
* limitations under the License.
*/
-#include <aidl/Vintf.h>
-
-#define LOG_TAG "VtsHalVisualizerTest"
-
-#include <Utils.h>
-#include <android/binder_enums.h>
#include <unordered_set>
+#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalVisualizerTest"
+#include <android-base/logging.h>
+#include <android/binder_enums.h>
+
#include "EffectHelper.h"
using namespace android;
@@ -213,4 +212,4 @@
ABinderProcess_setThreadPoolMaxThreadCount(1);
ABinderProcess_startThreadPool();
return RUN_ALL_TESTS();
-}
\ No newline at end of file
+}
diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
index 44ce146..fbd10a8 100644
--- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#define LOG_TAG "VtsHalVolumeTest"
-
-#include <Utils.h>
#include <aidl/Vintf.h>
+#define LOG_TAG "VtsHalVolumeTest"
+#include <android-base/logging.h>
+
#include "EffectHelper.h"
using namespace android;
diff --git a/audio/common/all-versions/default/HidlUtils.h b/audio/common/all-versions/default/HidlUtils.h
index ad9dee2..844a651 100644
--- a/audio/common/all-versions/default/HidlUtils.h
+++ b/audio/common/all-versions/default/HidlUtils.h
@@ -81,7 +81,7 @@
#endif
#if MAJOR_VERSION >= 7
- static constexpr char sAudioTagSeparator = ';';
+ static constexpr char sAudioTagSeparator = AUDIO_ATTRIBUTES_TAGS_SEPARATOR;
static status_t audioChannelMaskFromHal(audio_channel_mask_t halChannelMask, bool isInput,
AudioChannelMask* channelMask);
diff --git a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
index 98e49a2..478482d 100644
--- a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
+++ b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
@@ -1698,26 +1698,6 @@
ASSERT_EQ(0U, framesLost);
}
-TEST_P(InputStreamTest, getCapturePosition) {
- doc::test(
- "The capture position of a non prepared stream should not be "
- "retrievable or 0");
- uint64_t frames;
- uint64_t time;
- ASSERT_OK(stream->getCapturePosition(returnIn(res, frames, time)));
- // Although 'getCapturePosition' is mandatory in V7, legacy implementations
- // may return -ENOSYS (which is translated to NOT_SUPPORTED) in cases when
- // the capture position can't be retrieved, e.g. when the stream isn't
- // running. Because of this, we don't fail when getting NOT_SUPPORTED
- // in this test. Behavior of 'getCapturePosition' for running streams is
- // tested in 'PcmOnlyConfigInputStreamTest' for V7.
- ASSERT_RESULT(okOrInvalidStateOrNotSupported, res);
- if (res == Result::OK) {
- ASSERT_EQ(0U, frames);
- ASSERT_LE(0U, time);
- }
-}
-
//////////////////////////////////////////////////////////////////////////////
///////////////////////////////// StreamOut //////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
diff --git a/automotive/audiocontrol/aidl/vts/Android.bp b/automotive/audiocontrol/aidl/vts/Android.bp
index a9122ce..cfc2a3e 100644
--- a/automotive/audiocontrol/aidl/vts/Android.bp
+++ b/automotive/audiocontrol/aidl/vts/Android.bp
@@ -25,7 +25,6 @@
name: "VtsAidlHalAudioControlTest",
defaults: [
"latest_android_media_audio_common_types_cpp_static",
- "latest_android_hardware_audio_common_cpp_static",
"VtsHalTargetTestDefaults",
"use_libaidlvintf_gtest_helper_static",
],
@@ -40,6 +39,7 @@
],
static_libs: [
"android.hardware.automotive.audiocontrol-V3-cpp",
+ "android.hardware.audio.common-V1-cpp",
"libgmock",
],
test_suites: [
diff --git a/automotive/can/1.0/default/libc++fs/src/filesystem/directory_iterator.cpp b/automotive/can/1.0/default/libc++fs/src/filesystem/directory_iterator.cpp
index 624538b..37c863b 100644
--- a/automotive/can/1.0/default/libc++fs/src/filesystem/directory_iterator.cpp
+++ b/automotive/can/1.0/default/libc++fs/src/filesystem/directory_iterator.cpp
@@ -169,8 +169,8 @@
__dir_stream& operator=(const __dir_stream&) = delete;
__dir_stream(__dir_stream&& other) noexcept : __stream_(other.__stream_),
- __root_(move(other.__root_)),
- __entry_(move(other.__entry_)) {
+ __root_(std::move(other.__root_)),
+ __entry_(std::move(other.__entry_)) {
other.__stream_ = nullptr;
}
@@ -252,7 +252,7 @@
error_code m_ec;
if (!__imp_->advance(m_ec)) {
- path root = move(__imp_->__root_);
+ path root = std::move(__imp_->__root_);
__imp_.reset();
if (m_ec)
err.report(m_ec, "at root \"%s\"", root);
@@ -286,7 +286,7 @@
__imp_ = make_shared<__shared_imp>();
__imp_->__options_ = opt;
- __imp_->__stack_.push(move(new_s));
+ __imp_->__stack_.push(std::move(new_s));
}
void recursive_directory_iterator::__pop(error_code* ec) {
@@ -340,7 +340,7 @@
}
if (m_ec) {
- path root = move(stack.top().__root_);
+ path root = std::move(stack.top().__root_);
__imp_.reset();
err.report(m_ec, "at root \"%s\"", root);
} else {
@@ -374,7 +374,7 @@
if (!skip_rec) {
__dir_stream new_it(curr_it.__entry_.path(), __imp_->__options_, m_ec);
if (new_it.good()) {
- __imp_->__stack_.push(move(new_it));
+ __imp_->__stack_.push(std::move(new_it));
return true;
}
}
@@ -385,7 +385,7 @@
if (ec)
ec->clear();
} else {
- path at_ent = move(curr_it.__entry_.__p_);
+ path at_ent = std::move(curr_it.__entry_.__p_);
__imp_.reset();
err.report(m_ec, "attempting recursion into \"%s\"", at_ent);
}
diff --git a/automotive/evs/OWNERS b/automotive/evs/OWNERS
index b973e91..15de48f 100644
--- a/automotive/evs/OWNERS
+++ b/automotive/evs/OWNERS
@@ -1,3 +1,2 @@
ankitarora@google.com
-changyeon@google.com
jwhpryor@google.com
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/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/bind_to_device_socket_mutator/Android.bp b/automotive/remoteaccess/bind_to_device_socket_mutator/Android.bp
new file mode 100644
index 0000000..113b14e
--- /dev/null
+++ b/automotive/remoteaccess/bind_to_device_socket_mutator/Android.bp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_defaults {
+ name: "BindToDeviceSocketMutatorDefaults",
+ static_libs: [
+ "android.hardware.automotive.can@libnetdevice",
+ "libnl++",
+ ],
+ shared_libs: [
+ "libbase",
+ "liblog",
+ "libgrpc++",
+ ],
+ cflags: [
+ "-Wno-unused-parameter",
+ ],
+}
+
+cc_library {
+ name: "BindToDeviceSocketMutatorLib",
+ vendor_available: true,
+ srcs: ["src/*"],
+ export_include_dirs: ["include"],
+ defaults: ["BindToDeviceSocketMutatorDefaults"],
+}
diff --git a/automotive/remoteaccess/bind_to_device_socket_mutator/include/BindToDeviceSocketMutator.h b/automotive/remoteaccess/bind_to_device_socket_mutator/include/BindToDeviceSocketMutator.h
new file mode 100644
index 0000000..bafcc65
--- /dev/null
+++ b/automotive/remoteaccess/bind_to_device_socket_mutator/include/BindToDeviceSocketMutator.h
@@ -0,0 +1,35 @@
+/*
+ * 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 <grpc++/grpc++.h>
+#include <src/core/lib/iomgr/socket_mutator.h>
+#include <string>
+
+namespace android::hardware::automotive::remoteaccess {
+
+class BindToDeviceSocketMutator final : public grpc_socket_mutator {
+ public:
+ BindToDeviceSocketMutator(const std::string_view& interface_name);
+
+ bool mutateFd(int fd);
+
+ private:
+ std::string mIfname;
+};
+
+} // namespace android::hardware::automotive::remoteaccess
diff --git a/automotive/remoteaccess/bind_to_device_socket_mutator/src/BindToDeviceSocketMutator.cpp b/automotive/remoteaccess/bind_to_device_socket_mutator/src/BindToDeviceSocketMutator.cpp
new file mode 100644
index 0000000..c6a96de
--- /dev/null
+++ b/automotive/remoteaccess/bind_to_device_socket_mutator/src/BindToDeviceSocketMutator.cpp
@@ -0,0 +1,57 @@
+/*
+ * 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 "BindToDeviceSocketMutator.h"
+
+#include <android-base/logging.h>
+#include <errno.h>
+#include <sys/socket.h>
+
+namespace android::hardware::automotive::remoteaccess {
+
+bool BindToDeviceSocketMutator::mutateFd(int fd) {
+ int ret = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, mIfname.c_str(), mIfname.size());
+ if (ret != 0) {
+ PLOG(ERROR) << "Can't bind socket to interface " << mIfname;
+ return false;
+ }
+ return true;
+}
+
+bool bind_to_device_mutator_mutate_fd(int fd, grpc_socket_mutator* mutator) {
+ BindToDeviceSocketMutator* bsm = (BindToDeviceSocketMutator*)mutator;
+ return bsm->mutateFd(fd);
+}
+
+int bind_to_device_mutator_compare(grpc_socket_mutator* a, grpc_socket_mutator* b) {
+ return ((a) < (b) ? -1 : ((a) > (b) ? 1 : 0));
+}
+
+void bind_to_device_mutator_destroy(grpc_socket_mutator* mutator) {
+ BindToDeviceSocketMutator* bsm = (BindToDeviceSocketMutator*)mutator;
+ delete bsm;
+}
+
+grpc_socket_mutator_vtable bind_to_device_mutator_vtable = {bind_to_device_mutator_mutate_fd,
+ bind_to_device_mutator_compare,
+ bind_to_device_mutator_destroy};
+
+BindToDeviceSocketMutator::BindToDeviceSocketMutator(const std::string_view& interface_name) {
+ mIfname = interface_name;
+ grpc_socket_mutator_init(this, &bind_to_device_mutator_vtable);
+}
+
+} // namespace android::hardware::automotive::remoteaccess
diff --git a/automotive/remoteaccess/hal/default/Android.bp b/automotive/remoteaccess/hal/default/Android.bp
index f27b8f8..0155667 100644
--- a/automotive/remoteaccess/hal/default/Android.bp
+++ b/automotive/remoteaccess/hal/default/Android.bp
@@ -22,22 +22,27 @@
name: "remote-access-hal-defaults",
vendor: true,
relative_install_path: "hw",
- srcs: ["src/RemoteAccessImpl.cpp"],
+ srcs: [
+ "src/RemoteAccessImpl.cpp",
+ ],
whole_static_libs: [
"RemoteAccessService",
],
+ static_libs: [
+ "BindToDeviceSocketMutatorLib",
+ ],
shared_libs: [
- "libbase",
"libbinder_ndk",
- "liblog",
"libutils",
- "libgrpc++",
"libprotobuf-cpp-full",
],
defaults: [
"vhalclient_defaults",
+ "BindToDeviceSocketMutatorDefaults",
],
cflags: [
+ // This is already included in BindToDeviceSocketMutatorDefaults but
+ // might be overridden by vhalclient_defaults.
"-Wno-unused-parameter",
],
}
@@ -59,6 +64,7 @@
init_rc: ["remoteaccess-tcu-test-service.rc"],
cflags: [
"-DGRPC_SERVICE_ADDRESS=\"10.10.10.1:50051\"",
+ "-DGRPC_SERVICE_IFNAME=\"eth1\"",
],
}
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
index 8720c2f..d525141 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
@@ -18,45 +18,60 @@
#include "RemoteAccessService.h"
+#include "BindToDeviceSocketMutator.h"
+
+#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
#include <grpcpp/create_channel.h>
+#include <libnetdevice/libnetdevice.h>
#include <stdlib.h>
-#include <utils/Log.h>
constexpr char SERVICE_NAME[] = "android.hardware.automotive.remoteaccess.IRemoteAccess/default";
int main(int /* argc */, char* /* argv */[]) {
- ALOGI("Registering RemoteAccessService as service...");
+ LOG(INFO) << "Registering RemoteAccessService as service...";
#ifndef GRPC_SERVICE_ADDRESS
- ALOGE("GRPC_SERVICE_ADDRESS is not defined, exiting");
+ LOG(ERROR) << "GRPC_SERVICE_ADDRESS is not defined, exiting";
exit(1);
#endif
- auto channel = grpc::CreateChannel(GRPC_SERVICE_ADDRESS, grpc::InsecureChannelCredentials());
+ grpc::ChannelArguments grpcargs = {};
+
+#ifdef GRPC_SERVICE_IFNAME
+ grpcargs.SetSocketMutator(
+ new android::hardware::automotive::remoteaccess::BindToDeviceSocketMutator(
+ GRPC_SERVICE_IFNAME));
+ LOG(DEBUG) << "GRPC_SERVICE_IFNAME specified as: " << GRPC_SERVICE_IFNAME;
+ LOG(INFO) << "Waiting for interface: " << GRPC_SERVICE_IFNAME;
+ android::netdevice::waitFor({GRPC_SERVICE_IFNAME},
+ android::netdevice::WaitCondition::PRESENT_AND_UP);
+ LOG(INFO) << "Waiting for interface: " << GRPC_SERVICE_IFNAME << " done";
+#endif
+ auto channel = grpc::CreateCustomChannel(GRPC_SERVICE_ADDRESS,
+ grpc::InsecureChannelCredentials(), grpcargs);
auto clientStub = android::hardware::automotive::remoteaccess::WakeupClient::NewStub(channel);
auto service = ndk::SharedRefBase::make<
android::hardware::automotive::remoteaccess::RemoteAccessService>(clientStub.get());
binder_exception_t err = AServiceManager_addService(service->asBinder().get(), SERVICE_NAME);
if (err != EX_NONE) {
- ALOGE("failed to register android.hardware.automotive.remote.IRemoteAccess service, "
- "exception: %d",
- err);
+ LOG(ERROR) << "failed to register android.hardware.automotive.remote.IRemoteAccess service"
+ << ", exception: " << err;
exit(1);
}
if (!ABinderProcess_setThreadPoolMaxThreadCount(1)) {
- ALOGE("%s", "failed to set thread pool max thread count");
+ LOG(ERROR) << "failed to set thread pool max thread count";
exit(1);
}
ABinderProcess_startThreadPool();
- ALOGI("RemoteAccess service Ready");
+ LOG(INFO) << "RemoteAccess service Ready";
ABinderProcess_joinThreadPool();
- ALOGW("Should not reach here");
+ LOG(ERROR) << "Should not reach here";
return 0;
}
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 df5ada6..b5026a6 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
@@ -124,6 +124,17 @@
android::ConcurrentQueue<VehiclePropValuePtr> mEventQueue;
android::ConcurrentQueue<VehiclePropValuePtr> mHeartBeatQueue;
+ // Wait until receive enough events in receivedEvents.
+ void waitForEvents(std::vector<VehiclePropValuePtr>* receivedEvents, size_t count) {
+ while (receivedEvents->size() < count) {
+ mEventQueue.waitForItems();
+ auto newEvents = mEventQueue.flush();
+ for (size_t i = 0; i < newEvents.size(); i++) {
+ receivedEvents->push_back(std::move(newEvents[i]));
+ }
+ }
+ }
+
private:
void onHalEvent(VehiclePropValuePtr v) {
if (v->prop != toInt(VehicleProperty::VHAL_HEARTBEAT)) {
@@ -314,26 +325,25 @@
ASSERT_EQ(StatusCode::OK, status);
- std::this_thread::sleep_for(std::chrono::milliseconds(500));
+ std::vector<VehiclePropValuePtr> receivedEvents;
+ waitForEvents(&receivedEvents, 5);
- // Modify the speed after 0.5 seconds.
+ // Modify the speed after 5 events arrive.
VehiclePropValue value;
value.prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED);
value.value.floatValues.resize(1);
value.value.floatValues[0] = 1.0f;
ASSERT_EQ(StatusCode::OK, mHal->set(value));
- std::this_thread::sleep_for(std::chrono::milliseconds(500));
-
- auto events = mEventQueue.flush();
- ASSERT_LE((size_t)10, events.size());
+ waitForEvents(&receivedEvents, 10);
// The first event should be the default value.
- ASSERT_EQ((size_t)1, events[0]->value.floatValues.size());
- EXPECT_EQ(0.0f, events[0]->value.floatValues[0]);
+ ASSERT_EQ((size_t)1, receivedEvents[0]->value.floatValues.size());
+ EXPECT_EQ(0.0f, receivedEvents[0]->value.floatValues[0]);
// The last event should be the value after update.
- ASSERT_EQ((size_t)1, events[events.size() - 1]->value.floatValues.size());
- EXPECT_EQ(1.0f, events[events.size() - 1]->value.floatValues[0]);
+ const auto& lastEvent = receivedEvents[receivedEvents.size() - 1];
+ ASSERT_EQ((size_t)1, lastEvent->value.floatValues.size());
+ EXPECT_EQ(1.0f, lastEvent->value.floatValues[0]);
}
TEST_F(DefaultVhalImplTest, testSubscribeInvalidProp) {
diff --git a/automotive/vehicle/2.0/default/tests/RecurrentTimer_test.cpp b/automotive/vehicle/2.0/default/tests/RecurrentTimer_test.cpp
index d7547f6..2e59dbf 100644
--- a/automotive/vehicle/2.0/default/tests/RecurrentTimer_test.cpp
+++ b/automotive/vehicle/2.0/default/tests/RecurrentTimer_test.cpp
@@ -69,7 +69,7 @@
std::this_thread::sleep_for(milliseconds(100));
// This test is unstable, so set the tolerance to 50.
ASSERT_EQ_WITH_TOLERANCE(100, counter1ms.load(), 50);
- ASSERT_EQ_WITH_TOLERANCE(20, counter5ms.load(), 5);
+ ASSERT_EQ_WITH_TOLERANCE(20, counter5ms.load(), 10);
}
} // anonymous namespace
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 83b0d94..d75b046 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -829,10 +829,10 @@
/*
* HVAC Properties
*
- * Additional rules for mapping a zoned HVAC property (except
- * HVAC_MAX_DEFROST_ON) to AreaIDs:
- * - Every seat in VehicleAreaSeat that is available in the car, must be
- * part of an AreaID in the AreaID array.
+ * Additional rules for mapping non-GLOBAL VehicleArea type HVAC properties
+ * to AreaIDs:
+ * - Every “area” for a specific VehicleArea type that is affected by the
+ * property, must be included in an area ID for that property.
*
* Example 1: A car has two front seats (ROW_1_LEFT, ROW_1_RIGHT) and three
* back seats (ROW_2_LEFT, ROW_2_CENTER, ROW_2_RIGHT). There are two
@@ -860,6 +860,16 @@
* - ROW_1_LEFT
* - ROW_1_RIGHT
* - ROW_2_LEFT | ROW_2_CENTER | ROW_2_RIGHT | ROW_3_LEFT | ROW_3_CENTER | ROW_3_RIGHT
+ *
+ * Example 3: A car has two front seats (ROW_1_LEFT, ROW_1_RIGHT) and three
+ * back seats (ROW_2_LEFT, ROW_2_CENTER, ROW_2_RIGHT). Suppose the car
+ * supports HVAC_AUTO_ON for just the two front seats.
+ * - A valid mapping set of AreaIDs for HVAC_AUTO_ON would be:
+ * - ROW_1_LEFT | ROW_1_RIGHT
+ * - If HVAC_AUTO_ON had two separate control units for the driver side
+ * and passenger side, an alternative mapping would be:
+ * - ROW_1_LEFT
+ * - ROW_1_RIGHT
*/
/**
@@ -1800,11 +1810,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/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
index 2335d6d..d0c6e83 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
@@ -191,6 +191,7 @@
{VehicleProperty::GLOVE_BOX_DOOR_POS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::GLOVE_BOX_LOCKED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::VEHICLE_MAP_SERVICE, VehiclePropertyAccess::READ_WRITE},
+ {VehicleProperty::LOCATION_CHARACTERIZATION, VehiclePropertyAccess::READ},
{VehicleProperty::OBD2_LIVE_FRAME, VehiclePropertyAccess::READ},
{VehicleProperty::OBD2_FREEZE_FRAME, VehiclePropertyAccess::READ},
{VehicleProperty::OBD2_FREEZE_FRAME_INFO, VehiclePropertyAccess::READ},
@@ -265,12 +266,12 @@
{VehicleProperty::CRUISE_CONTROL_TYPE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::CRUISE_CONTROL_STATE, VehiclePropertyAccess::READ},
{VehicleProperty::CRUISE_CONTROL_COMMAND, VehiclePropertyAccess::WRITE},
+ {VehicleProperty::CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyAccess::READ},
+ {VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyAccess::READ_WRITE},
+ {VehicleProperty::ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyAccess::READ},
{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 a0911c5..48532c9 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
@@ -191,6 +191,7 @@
{VehicleProperty::GLOVE_BOX_DOOR_POS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::GLOVE_BOX_LOCKED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::VEHICLE_MAP_SERVICE, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::LOCATION_CHARACTERIZATION, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::OBD2_LIVE_FRAME, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::OBD2_FREEZE_FRAME, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::OBD2_FREEZE_FRAME_INFO, VehiclePropertyChangeMode::ON_CHANGE},
@@ -265,12 +266,12 @@
{VehicleProperty::CRUISE_CONTROL_TYPE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::CRUISE_CONTROL_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::CRUISE_CONTROL_COMMAND, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyChangeMode::CONTINUOUS},
{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 e9670c1..758670d 100644
--- a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
@@ -183,6 +183,7 @@
Map.entry(VehicleProperty.GLOVE_BOX_DOOR_POS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.GLOVE_BOX_LOCKED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.VEHICLE_MAP_SERVICE, VehiclePropertyAccess.READ_WRITE),
+ Map.entry(VehicleProperty.LOCATION_CHARACTERIZATION, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.OBD2_LIVE_FRAME, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.OBD2_FREEZE_FRAME, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.OBD2_FREEZE_FRAME_INFO, VehiclePropertyAccess.READ),
@@ -257,12 +258,12 @@
Map.entry(VehicleProperty.CRUISE_CONTROL_TYPE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.CRUISE_CONTROL_STATE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.CRUISE_CONTROL_COMMAND, VehiclePropertyAccess.WRITE),
+ Map.entry(VehicleProperty.CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyAccess.READ_WRITE),
+ 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 2513e4e..29069f8 100644
--- a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
@@ -183,6 +183,7 @@
Map.entry(VehicleProperty.GLOVE_BOX_DOOR_POS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.GLOVE_BOX_LOCKED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.VEHICLE_MAP_SERVICE, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.LOCATION_CHARACTERIZATION, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.OBD2_LIVE_FRAME, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.OBD2_FREEZE_FRAME, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.OBD2_FREEZE_FRAME_INFO, VehiclePropertyChangeMode.ON_CHANGE),
@@ -257,12 +258,12 @@
Map.entry(VehicleProperty.CRUISE_CONTROL_TYPE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.CRUISE_CONTROL_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.CRUISE_CONTROL_COMMAND, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP, VehiclePropertyChangeMode.ON_CHANGE),
+ 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 ff601e0..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;
@@ -57,6 +55,7 @@
using ::aidl::android::hardware::automotive::vehicle::LaneCenteringAssistState;
using ::aidl::android::hardware::automotive::vehicle::LaneDepartureWarningState;
using ::aidl::android::hardware::automotive::vehicle::LaneKeepAssistState;
+using ::aidl::android::hardware::automotive::vehicle::LocationCharacterization;
using ::aidl::android::hardware::automotive::vehicle::RawPropValues;
using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReport;
using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReq;
@@ -136,6 +135,7 @@
#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
// Following are test properties:
{"ECHO_REVERSE_BYTES", ECHO_REVERSE_BYTES},
+ {"VENDOR_PROPERTY_ID", VENDOR_PROPERTY_ID},
{"kMixedTypePropertyForTest", kMixedTypePropertyForTest},
{"VENDOR_CLUSTER_NAVIGATION_STATE", VENDOR_CLUSTER_NAVIGATION_STATE},
{"VENDOR_CLUSTER_REQUEST_DISPLAY", VENDOR_CLUSTER_REQUEST_DISPLAY},
@@ -199,6 +199,8 @@
std::make_unique<ConstantParser<VehiclePropertyAccess>>();
mConstantParsersByType["VehiclePropertyChangeMode"] =
std::make_unique<ConstantParser<VehiclePropertyChangeMode>>();
+ mConstantParsersByType["LocationCharacterization"] =
+ std::make_unique<ConstantParser<LocationCharacterization>>();
mConstantParsersByType["VehicleGear"] = std::make_unique<ConstantParser<VehicleGear>>();
mConstantParsersByType["VehicleAreaWindow"] =
std::make_unique<ConstantParser<VehicleAreaWindow>>();
@@ -241,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 85a7486..28790e2 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
]
}
},
@@ -1329,22 +1329,26 @@
},
{
"property": "VehicleProperty::SEAT_OCCUPANCY",
+ "defaultValue": {
+ "int32Values": [
+ "VehicleSeatOccupancyState::VACANT"
+ ]
+ },
"areas": [
{
- "defaultValue": {
- "int32Values": [
- "VehicleSeatOccupancyState::VACANT"
- ]
- },
"areaId": "Constants::SEAT_1_LEFT"
},
{
- "defaultValue": {
- "int32Values": [
- "VehicleSeatOccupancyState::VACANT"
- ]
- },
"areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -1854,7 +1858,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -1867,7 +1883,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
],
"configArray": [
@@ -1918,7 +1946,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -1931,7 +1971,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -1944,7 +1996,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -1957,7 +2021,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -1970,7 +2046,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -1983,7 +2071,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -2009,7 +2109,27 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL",
+ "areaId": "Constants::SEAT_1_LEFT",
+ "minInt32Value": 1,
+ "maxInt32Value": 7
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT",
+ "minInt32Value": 1,
+ "maxInt32Value": 7
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT",
+ "minInt32Value": 1,
+ "maxInt32Value": 7
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT",
+ "minInt32Value": 1,
+ "maxInt32Value": 7
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER",
"minInt32Value": 1,
"maxInt32Value": 7
}
@@ -2024,7 +2144,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -2043,7 +2175,19 @@
},
"areas": [
{
- "areaId": "Constants::HVAC_ALL"
+ "areaId": "Constants::SEAT_1_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
@@ -2064,6 +2208,21 @@
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": 0,
"maxInt32Value": 3
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT",
+ "minInt32Value": 0,
+ "maxInt32Value": 3
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT",
+ "minInt32Value": 0,
+ "maxInt32Value": 3
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER",
+ "minInt32Value": 0,
+ "maxInt32Value": 3
}
],
"comment": "0 is off and +ve values indicate ventilation level."
@@ -2101,6 +2260,21 @@
"areaId": "Constants::SEAT_1_RIGHT",
"minInt32Value": -2,
"maxInt32Value": 2
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT",
+ "minInt32Value": -2,
+ "maxInt32Value": 2
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT",
+ "minInt32Value": -2,
+ "maxInt32Value": 2
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER",
+ "minInt32Value": -2,
+ "maxInt32Value": 2
}
],
"comment": "+ve values for heating and -ve for cooling"
@@ -2122,45 +2296,59 @@
},
{
"property": "VehicleProperty::HVAC_TEMPERATURE_CURRENT",
+ "defaultValue": {
+ "floatValues": [
+ 19.1
+ ]
+ },
"areas": [
{
- "defaultValue": {
- "floatValues": [
- 17.3
- ]
- },
- "areaId": 49
+ "areaId": "Constants::SEAT_1_LEFT"
},
{
- "defaultValue": {
- "floatValues": [
- 19.1
- ]
- },
- "areaId": 68
+ "areaId": "Constants::SEAT_1_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT"
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER"
}
]
},
{
"property": "VehicleProperty::HVAC_TEMPERATURE_SET",
+ "defaultValue": {
+ "floatValues": [
+ 17.0
+ ]
+ },
"areas": [
{
- "defaultValue": {
- "floatValues": [
- 16.0
- ]
- },
- "areaId": 49,
+ "areaId": "Constants::SEAT_1_LEFT",
"minFloatValue": 16.0,
"maxFloatValue": 28.0
},
{
- "defaultValue": {
- "floatValues": [
- 20.0
- ]
- },
- "areaId": 68,
+ "areaId": "Constants::SEAT_1_RIGHT",
+ "minFloatValue": 16.0,
+ "maxFloatValue": 28.0
+ },
+ {
+ "areaId": "Constants::SEAT_2_LEFT",
+ "minFloatValue": 16.0,
+ "maxFloatValue": 28.0
+ },
+ {
+ "areaId": "Constants::SEAT_2_RIGHT",
+ "minFloatValue": 16.0,
+ "maxFloatValue": 28.0
+ },
+ {
+ "areaId": "Constants::SEAT_2_CENTER",
"minFloatValue": 16.0,
"maxFloatValue": 28.0
}
@@ -3130,6 +3318,14 @@
"property": "VehicleProperty::VEHICLE_MAP_SERVICE"
},
{
+ "property": "VehicleProperty::LOCATION_CHARACTERIZATION",
+ "defaultValue": {
+ "int32Values": [
+ "LocationCharacterization::RAW_GNSS_ONLY"
+ ]
+ }
+ },
+ {
"property": "VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_TYPE",
"defaultValue": {
"int32Values": [
@@ -3249,6 +3445,54 @@
]
},
{
+ "property": "VehicleProperty::CRUISE_CONTROL_TARGET_SPEED",
+ "defaultValue": {
+ "floatValues": [
+ 25.0
+ ]
+ },
+ "areas": [
+ {
+ "areaId": 0,
+ "minFloatValue": 20.0,
+ "maxFloatValue": 35.0
+ }
+ ]
+ },
+ {
+ "property": "VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP",
+ "defaultValue": {
+ "int32Values": [
+ 1200
+ ]
+ },
+ "configArray": [
+ 1200,
+ 1400,
+ 1600,
+ 1800,
+ 2000,
+ 2200
+ ]
+ },
+ {
+ "property": "VehicleProperty::ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE",
+ "defaultValue": {
+ "int32Values": [
+ 100000
+ ]
+ },
+ "areas": [
+ {
+ "areaId": 0,
+ "minInt32Value": 0,
+ "maxInt32Value": 200000
+ }
+ ],
+ "maxSampleRate": 10.0,
+ "minSampleRate": 1.0
+ },
+ {
"property": "VehicleProperty::HANDS_ON_DETECTION_ENABLED",
"defaultValue": {
"int32Values": [
@@ -3293,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/default_config/config/TestProperties.json b/automotive/vehicle/aidl/impl/default_config/config/TestProperties.json
index 33c6cc2..fd4b002 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/TestProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/TestProperties.json
@@ -182,6 +182,11 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
+ "property": "Constants::VENDOR_PROPERTY_ID",
+ "access": "VehiclePropertyAccess::READ_WRITE",
+ "changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
+ },
+ {
"property": "VehicleProperty::SUPPORT_CUSTOMIZE_VENDOR_PERMISSION",
"defaultValue": {
"int32Values": [
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 956c7c0..6fd2367 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
@@ -194,7 +194,7 @@
const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value) const;
ValueResultType getEchoReverseBytes(
const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value) const;
- bool isHvacPropAndHvacNotAvailable(int32_t propId) const;
+ bool isHvacPropAndHvacNotAvailable(int32_t propId, int32_t areaId) const;
std::unordered_map<int32_t, ConfigDeclaration> loadConfigDeclarations();
@@ -236,7 +236,7 @@
const aidl::android::hardware::automotive::vehicle::SetValueRequest& request);
std::string genFakeDataCommand(const std::vector<std::string>& options);
- void sendHvacPropertiesCurrentValues();
+ void sendHvacPropertiesCurrentValues(int32_t areaId);
static aidl::android::hardware::automotive::vehicle::VehiclePropValue createHwInputKeyProp(
aidl::android::hardware::automotive::vehicle::VehicleHwKeyInputAction action,
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 a9dced9..78c21e9 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -15,6 +15,7 @@
*/
#define LOG_TAG "FakeVehicleHardware"
+#define ATRACE_TAG ATRACE_TAG_HAL
#define FAKE_VEHICLEHARDWARE_DEBUG false // STOPSHIP if true.
#include "FakeVehicleHardware.h"
@@ -33,6 +34,7 @@
#include <android-base/strings.h>
#include <utils/Log.h>
#include <utils/SystemClock.h>
+#include <utils/Trace.h>
#include <dirent.h>
#include <inttypes.h>
@@ -85,7 +87,8 @@
// overwrite the default configs.
constexpr char OVERRIDE_PROPERTY[] = "persist.vendor.vhal_init_value_override";
constexpr char POWER_STATE_REQ_CONFIG_PROPERTY[] = "ro.vendor.fake_vhal.ap_power_state_req.config";
-
+// The value to be returned if VENDOR_PROPERTY_ID is set as the property
+constexpr int VENDOR_ERROR_CODE = 0x00ab0005;
// A list of supported options for "--set" command.
const std::unordered_set<std::string> SET_PROP_OPTIONS = {
// integer.
@@ -295,16 +298,27 @@
return {};
}
-bool FakeVehicleHardware::isHvacPropAndHvacNotAvailable(int32_t propId) const {
+bool FakeVehicleHardware::isHvacPropAndHvacNotAvailable(int32_t propId, int32_t areaId) const {
std::unordered_set<int32_t> powerProps(std::begin(HVAC_POWER_PROPERTIES),
std::end(HVAC_POWER_PROPERTIES));
if (powerProps.count(propId)) {
- auto hvacPowerOnResult =
- mServerSidePropStore->readValue(toInt(VehicleProperty::HVAC_POWER_ON), HVAC_ALL);
-
- if (hvacPowerOnResult.ok() && hvacPowerOnResult.value()->value.int32Values.size() == 1 &&
- hvacPowerOnResult.value()->value.int32Values[0] == 0) {
- return true;
+ auto hvacPowerOnResults =
+ mServerSidePropStore->readValuesForProperty(toInt(VehicleProperty::HVAC_POWER_ON));
+ if (!hvacPowerOnResults.ok()) {
+ ALOGW("failed to get HVAC_POWER_ON 0x%x, error: %s",
+ toInt(VehicleProperty::HVAC_POWER_ON), getErrorMsg(hvacPowerOnResults).c_str());
+ return false;
+ }
+ auto& hvacPowerOnValues = hvacPowerOnResults.value();
+ for (size_t j = 0; j < hvacPowerOnValues.size(); j++) {
+ auto hvacPowerOnValue = std::move(hvacPowerOnValues[j]);
+ if ((hvacPowerOnValue->areaId & areaId) == areaId) {
+ if (hvacPowerOnValue->value.int32Values.size() == 1 &&
+ hvacPowerOnValue->value.int32Values[0] == 0) {
+ return true;
+ }
+ break;
+ }
}
}
return false;
@@ -366,7 +380,7 @@
return getUserHalProp(value);
}
- if (isHvacPropAndHvacNotAvailable(propId)) {
+ if (isHvacPropAndHvacNotAvailable(propId, value.areaId)) {
*isSpecialValue = true;
return StatusError(StatusCode::NOT_AVAILABLE) << "hvac not available";
}
@@ -389,6 +403,9 @@
case ECHO_REVERSE_BYTES:
*isSpecialValue = true;
return getEchoReverseBytes(value);
+ case VENDOR_PROPERTY_ID:
+ *isSpecialValue = true;
+ return StatusError((StatusCode)VENDOR_ERROR_CODE);
default:
// Do nothing.
break;
@@ -413,7 +430,7 @@
return std::move(gotValue);
}
-void FakeVehicleHardware::sendHvacPropertiesCurrentValues() {
+void FakeVehicleHardware::sendHvacPropertiesCurrentValues(int32_t areaId) {
for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
int powerPropId = HVAC_POWER_PROPERTIES[i];
auto powerPropResults = mServerSidePropStore->readValuesForProperty(powerPropId);
@@ -425,11 +442,13 @@
auto& powerPropValues = powerPropResults.value();
for (size_t j = 0; j < powerPropValues.size(); j++) {
auto powerPropValue = std::move(powerPropValues[j]);
- powerPropValue->status = VehiclePropertyStatus::AVAILABLE;
- powerPropValue->timestamp = elapsedRealtimeNano();
- // This will trigger a property change event for the current hvac property value.
- mServerSidePropStore->writeValue(std::move(powerPropValue), /*updateStatus=*/true,
- VehiclePropertyStore::EventMode::ALWAYS);
+ if ((powerPropValue->areaId & areaId) == powerPropValue->areaId) {
+ powerPropValue->status = VehiclePropertyStatus::AVAILABLE;
+ powerPropValue->timestamp = elapsedRealtimeNano();
+ // This will trigger a property change event for the current hvac property value.
+ mServerSidePropStore->writeValue(std::move(powerPropValue), /*updateStatus=*/true,
+ VehiclePropertyStore::EventMode::ALWAYS);
+ }
}
}
}
@@ -449,10 +468,10 @@
value.value.int32Values[0] == 1) {
// If we are turning HVAC power on, send current hvac property values through on change
// event.
- sendHvacPropertiesCurrentValues();
+ sendHvacPropertiesCurrentValues(value.areaId);
}
- if (isHvacPropAndHvacNotAvailable(propId)) {
+ if (isHvacPropAndHvacNotAvailable(propId, value.areaId)) {
*isSpecialValue = true;
return StatusError(StatusCode::NOT_AVAILABLE) << "hvac not available";
}
@@ -469,6 +488,9 @@
case OBD2_FREEZE_FRAME_CLEAR:
*isSpecialValue = true;
return mFakeObd2Frame->clearObd2FreezeFrames(value);
+ case VENDOR_PROPERTY_ID:
+ *isSpecialValue = true;
+ return StatusError((StatusCode)VENDOR_ERROR_CODE);
#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
case toInt(VehicleProperty::CLUSTER_REPORT_STATE):
@@ -1621,11 +1643,15 @@
std::unordered_map<std::shared_ptr<const GetValuesCallback>, std::vector<GetValueResult>>
callbackToResults;
for (const auto& rwc : mRequests.flush()) {
+ ATRACE_BEGIN("FakeVehicleHardware:handleGetValueRequest");
auto result = mHardware->handleGetValueRequest(rwc.request);
+ ATRACE_END();
callbackToResults[rwc.callback].push_back(std::move(result));
}
for (const auto& [callback, results] : callbackToResults) {
+ ATRACE_BEGIN("FakeVehicleHardware:call get value result callback");
(*callback)(std::move(results));
+ ATRACE_END();
}
}
@@ -1635,11 +1661,15 @@
std::unordered_map<std::shared_ptr<const SetValuesCallback>, std::vector<SetValueResult>>
callbackToResults;
for (const auto& rwc : mRequests.flush()) {
+ ATRACE_BEGIN("FakeVehicleHardware:handleSetValueRequest");
auto result = mHardware->handleSetValueRequest(rwc.request);
+ ATRACE_END();
callbackToResults[rwc.callback].push_back(std::move(result));
}
for (const auto& [callback, results] : callbackToResults) {
+ ATRACE_BEGIN("FakeVehicleHardware:call set value result callback");
(*callback)(std::move(results));
+ ATRACE_END();
}
}
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 67b1aa4..93a63ad 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -409,6 +409,11 @@
continue;
}
+ if (propId == VENDOR_PROPERTY_ID) {
+ // Ignore VENDOR_PROPERTY_ID, it has special logic.
+ continue;
+ }
+
if (isGlobalProp(propId)) {
if (config.initialValue == RawPropValues{}) {
addGetValueRequest(getValueRequests, expectedGetValueResults, requestId++,
@@ -1142,67 +1147,100 @@
}
TEST_F(FakeVehicleHardwareTest, testGetHvacPropNotAvailable) {
- StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = HVAC_ALL,
- .value.int32Values = {0}});
+ int seatAreaIds[5] = {SEAT_1_LEFT, SEAT_1_RIGHT, SEAT_2_LEFT, SEAT_2_CENTER, SEAT_2_RIGHT};
+ for (int areaId : seatAreaIds) {
+ StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
+ .areaId = areaId,
+ .value.int32Values = {0}});
- ASSERT_EQ(status, StatusCode::OK);
+ ASSERT_EQ(status, StatusCode::OK);
- for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
- int powerPropId = HVAC_POWER_PROPERTIES[i];
- auto getValueResult = getValue(VehiclePropValue{
- .prop = powerPropId,
- .areaId = HVAC_ALL,
- });
+ for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
+ int powerPropId = HVAC_POWER_PROPERTIES[i];
+ for (int powerDependentAreaId : seatAreaIds) {
+ auto getValueResult = getValue(VehiclePropValue{
+ .prop = powerPropId,
+ .areaId = powerDependentAreaId,
+ });
- EXPECT_FALSE(getValueResult.ok());
- EXPECT_EQ(getValueResult.error(), StatusCode::NOT_AVAILABLE);
+ if (areaId == powerDependentAreaId) {
+ EXPECT_FALSE(getValueResult.ok());
+ EXPECT_EQ(getValueResult.error(), StatusCode::NOT_AVAILABLE);
+ } else {
+ EXPECT_TRUE(getValueResult.ok());
+ }
+ }
+ }
+
+ // Resetting HVAC_POWER_ON at areaId back to ON state to ensure that there's no dependence
+ // on this value from any power dependent property values other than those with the same
+ // areaId.
+ setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
+ .areaId = areaId,
+ .value.int32Values = {1}});
}
}
TEST_F(FakeVehicleHardwareTest, testSetHvacPropNotAvailable) {
- StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = HVAC_ALL,
- .value.int32Values = {0}});
+ int seatAreaIds[5] = {SEAT_1_LEFT, SEAT_1_RIGHT, SEAT_2_LEFT, SEAT_2_CENTER, SEAT_2_RIGHT};
+ for (int areaId : seatAreaIds) {
+ StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
+ .areaId = areaId,
+ .value.int32Values = {0}});
- ASSERT_EQ(status, StatusCode::OK);
+ ASSERT_EQ(status, StatusCode::OK);
- for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
- int powerPropId = HVAC_POWER_PROPERTIES[i];
- status = setValue(VehiclePropValue{
- .prop = powerPropId,
- .areaId = HVAC_ALL,
- });
+ for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
+ int powerPropId = HVAC_POWER_PROPERTIES[i];
+ for (int powerDependentAreaId : seatAreaIds) {
+ StatusCode status = setValue(VehiclePropValue{.prop = powerPropId,
+ .areaId = powerDependentAreaId,
+ .value.int32Values = {1}});
- EXPECT_EQ(status, StatusCode::NOT_AVAILABLE);
+ if (areaId == powerDependentAreaId) {
+ EXPECT_EQ(status, StatusCode::NOT_AVAILABLE);
+ } else {
+ EXPECT_EQ(status, StatusCode::OK);
+ }
+ }
+ }
+
+ // Resetting HVAC_POWER_ON at areaId back to ON state to ensure that there's no dependence
+ // on this value from any power dependent property values other than those with the same
+ // areaId.
+ setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
+ .areaId = areaId,
+ .value.int32Values = {1}});
}
}
TEST_F(FakeVehicleHardwareTest, testHvacPowerOnSendCurrentHvacPropValues) {
- StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = HVAC_ALL,
- .value.int32Values = {0}});
+ int seatAreaIds[5] = {SEAT_1_LEFT, SEAT_1_RIGHT, SEAT_2_LEFT, SEAT_2_CENTER, SEAT_2_RIGHT};
+ for (int areaId : seatAreaIds) {
+ StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
+ .areaId = areaId,
+ .value.int32Values = {0}});
- ASSERT_EQ(status, StatusCode::OK);
+ ASSERT_EQ(status, StatusCode::OK);
- clearChangedProperties();
+ clearChangedProperties();
+ setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
+ .areaId = areaId,
+ .value.int32Values = {1}});
- status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = HVAC_ALL,
- .value.int32Values = {1}});
+ auto events = getChangedProperties();
+ // If we turn HVAC power on, we expect to receive one property event for every HVAC prop
+ // areas plus one event for HVAC_POWER_ON.
+ std::vector<int32_t> changedPropIds;
+ for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
+ changedPropIds.push_back(HVAC_POWER_PROPERTIES[i]);
+ }
+ changedPropIds.push_back(toInt(VehicleProperty::HVAC_POWER_ON));
- auto events = getChangedProperties();
- // If we turn HVAC power on, we expect to receive one property event for every HVAC prop areas
- // plus one event for HVAC_POWER_ON.
- std::vector<int32_t> changedPropIds;
- for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
- changedPropIds.push_back(HVAC_POWER_PROPERTIES[i]);
- }
- changedPropIds.push_back(toInt(VehicleProperty::HVAC_POWER_ON));
- ASSERT_EQ(events.size(), changedPropIds.size());
- for (const auto& event : events) {
- EXPECT_EQ(event.areaId, HVAC_ALL);
- EXPECT_THAT(event.prop, AnyOfArray(changedPropIds));
+ for (const auto& event : events) {
+ EXPECT_EQ(event.areaId, areaId);
+ EXPECT_THAT(event.prop, AnyOfArray(changedPropIds));
+ }
}
}
diff --git a/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehiclePropValueRequest.proto b/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehiclePropValueRequest.proto
index b16daa8..749ad6a 100644
--- a/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehiclePropValueRequest.proto
+++ b/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehiclePropValueRequest.proto
@@ -18,9 +18,33 @@
package android.hardware.automotive.vehicle.proto;
+import "android/hardware/automotive/vehicle/StatusCode.proto";
import "android/hardware/automotive/vehicle/VehiclePropValue.proto";
message VehiclePropValueRequest {
- int32 request_id = 1;
+ int64 request_id = 1;
VehiclePropValue value = 2;
};
+
+message SetValueResult {
+ int64 request_id = 1;
+ StatusCode status = 2;
+};
+
+message GetValueResult {
+ int64 request_id = 1;
+ StatusCode status = 2;
+ VehiclePropValue value = 3;
+};
+
+message VehiclePropValueRequests {
+ repeated VehiclePropValueRequest requests = 1;
+};
+
+message SetValueResults {
+ repeated SetValueResult results = 1;
+};
+
+message GetValueResults {
+ repeated GetValueResult results = 1;
+};
diff --git a/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h b/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h
index fc0c8db..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>
@@ -44,6 +42,7 @@
#include <aidl/android/hardware/automotive/vehicle/LaneCenteringAssistState.h>
#include <aidl/android/hardware/automotive/vehicle/LaneDepartureWarningState.h>
#include <aidl/android/hardware/automotive/vehicle/LaneKeepAssistState.h>
+#include <aidl/android/hardware/automotive/vehicle/LocationCharacterization.h>
#include <aidl/android/hardware/automotive/vehicle/Obd2CommonIgnitionMonitors.h>
#include <aidl/android/hardware/automotive/vehicle/Obd2FuelSystemStatus.h>
#include <aidl/android/hardware/automotive/vehicle/Obd2FuelType.h>
diff --git a/automotive/vehicle/aidl/impl/utils/test/include/TestPropertyUtils.h b/automotive/vehicle/aidl/impl/utils/test/include/TestPropertyUtils.h
index e6ea6fe..1400288 100644
--- a/automotive/vehicle/aidl/impl/utils/test/include/TestPropertyUtils.h
+++ b/automotive/vehicle/aidl/impl/utils/test/include/TestPropertyUtils.h
@@ -84,6 +84,13 @@
toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
toInt(testpropertyutils_impl::VehiclePropertyType::BYTES);
+// This property is used for testing vendor error codes end to end.
+// 0x21402a13
+constexpr int32_t VENDOR_PROPERTY_ID = 0x2a13 |
+ toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
+ toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
+ toInt(testpropertyutils_impl::VehiclePropertyType::INT32);
+
// This property is used for test purpose. End to end tests use this property to test set and get
// method for MIXED type properties.
constexpr int32_t kMixedTypePropertyForTest =
diff --git a/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp b/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
index 4a4e023..a7ac1b4 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
@@ -15,6 +15,7 @@
*/
#define LOG_TAG "DefaultVehicleHal"
+#define ATRACE_TAG ATRACE_TAG_HAL
#include <DefaultVehicleHal.h>
@@ -28,6 +29,7 @@
#include <private/android_filesystem_config.h>
#include <utils/Log.h>
#include <utils/SystemClock.h>
+#include <utils/Trace.h>
#include <inttypes.h>
#include <set>
@@ -350,6 +352,7 @@
ScopedAStatus DefaultVehicleHal::getValues(const CallbackType& callback,
const GetValueRequests& requests) {
+ ATRACE_CALL();
if (callback == nullptr) {
return ScopedAStatus::fromExceptionCode(EX_NULL_POINTER);
}
@@ -436,6 +439,7 @@
ScopedAStatus DefaultVehicleHal::setValues(const CallbackType& callback,
const SetValueRequests& requests) {
+ ATRACE_CALL();
if (callback == nullptr) {
return ScopedAStatus::fromExceptionCode(EX_NULL_POINTER);
}
diff --git a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
index 36fa5e6..05e569a 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
@@ -671,8 +671,8 @@
}
TEST_F(DefaultVehicleHalTest, testGetValuesFinishBeforeTimeout) {
- // timeout: 0.1s
- int64_t timeout = 100000000;
+ // timeout: 1s
+ int64_t timeout = 1000000000;
setTimeout(timeout);
GetValueRequests requests;
@@ -681,17 +681,15 @@
ASSERT_TRUE(getValuesTestCases(10, requests, expectedResults, expectedHardwareRequests).ok());
- // The response would be returned after 0.05s.
- getHardware()->setSleepTime(timeout / 2);
+ // The response would be returned after 0.01s.
+ getHardware()->setSleepTime(timeout / 100);
getHardware()->addGetValueResponses(expectedResults);
auto status = getClient()->getValues(getCallbackClient(), requests);
ASSERT_TRUE(status.isOk()) << "getValues failed: " << status.getMessage();
- // Wait for the response.
- std::this_thread::sleep_for(std::chrono::nanoseconds(timeout));
-
+ ASSERT_TRUE(getCallback()->waitForGetValueResults(1, timeout)) << "no results in callback";
auto maybeGetValueResults = getCallback()->nextGetValueResults();
ASSERT_TRUE(maybeGetValueResults.has_value()) << "no results in callback";
EXPECT_EQ(maybeGetValueResults.value().payloads, expectedResults) << "results mismatch";
@@ -699,8 +697,8 @@
}
TEST_F(DefaultVehicleHalTest, testGetValuesFinishAfterTimeout) {
- // timeout: 0.1s
- int64_t timeout = 100000000;
+ // timeout: 0.01s
+ int64_t timeout = 10000000;
setTimeout(timeout);
GetValueRequests requests;
@@ -709,17 +707,14 @@
ASSERT_TRUE(getValuesTestCases(10, requests, expectedResults, expectedHardwareRequests).ok());
- // The response would be returned after 0.2s.
- getHardware()->setSleepTime(timeout * 2);
+ // The response would be returned after 0.1s.
+ getHardware()->setSleepTime(timeout * 10);
getHardware()->addGetValueResponses(expectedResults);
auto status = getClient()->getValues(getCallbackClient(), requests);
ASSERT_TRUE(status.isOk()) << "getValues failed: " << status.getMessage();
- // Wait for the response.
- std::this_thread::sleep_for(std::chrono::nanoseconds(timeout * 5));
-
for (size_t i = 0; i < expectedResults.size(); i++) {
expectedResults[i] = {
.requestId = expectedResults[i].requestId,
@@ -728,6 +723,8 @@
};
}
+ ASSERT_TRUE(getCallback()->waitForGetValueResults(1, timeout * 100))
+ << "no results in callback";
auto maybeGetValueResults = getCallback()->nextGetValueResults();
ASSERT_TRUE(maybeGetValueResults.has_value()) << "no results in callback";
ASSERT_THAT(maybeGetValueResults.value().payloads, UnorderedElementsAreArray(expectedResults))
@@ -960,8 +957,8 @@
}
TEST_F(DefaultVehicleHalTest, testSetValuesFinishBeforeTimeout) {
- // timeout: 0.1s
- int64_t timeout = 100000000;
+ // timeout: 1s
+ int64_t timeout = 1000000000;
setTimeout(timeout);
SetValueRequests requests;
@@ -970,17 +967,15 @@
ASSERT_TRUE(setValuesTestCases(10, requests, expectedResults, expectedHardwareRequests).ok());
- // The response would be returned after 0.05s.
- getHardware()->setSleepTime(timeout / 2);
+ // The response would be returned after 0.01s.
+ getHardware()->setSleepTime(timeout / 100);
getHardware()->addSetValueResponses(expectedResults);
auto status = getClient()->setValues(getCallbackClient(), requests);
ASSERT_TRUE(status.isOk()) << "setValues failed: " << status.getMessage();
- // Wait for the response.
- std::this_thread::sleep_for(std::chrono::nanoseconds(timeout));
-
+ ASSERT_TRUE(getCallback()->waitForSetValueResults(1, timeout)) << "no set value results";
auto maybeSetValueResults = getCallback()->nextSetValueResults();
ASSERT_TRUE(maybeSetValueResults.has_value()) << "no results in callback";
EXPECT_EQ(maybeSetValueResults.value().payloads, expectedResults) << "results mismatch";
@@ -988,8 +983,8 @@
}
TEST_F(DefaultVehicleHalTest, testSetValuesFinishAfterTimeout) {
- // timeout: 0.1s
- int64_t timeout = 100000000;
+ // timeout: 0.01s
+ int64_t timeout = 10000000;
setTimeout(timeout);
SetValueRequests requests;
@@ -998,17 +993,14 @@
ASSERT_TRUE(setValuesTestCases(10, requests, expectedResults, expectedHardwareRequests).ok());
- // The response would be returned after 0.2s.
- getHardware()->setSleepTime(timeout * 2);
+ // The response would be returned after 0.1s.
+ getHardware()->setSleepTime(timeout * 10);
getHardware()->addSetValueResponses(expectedResults);
auto status = getClient()->setValues(getCallbackClient(), requests);
ASSERT_TRUE(status.isOk()) << "setValues failed: " << status.getMessage();
- // Wait for the response.
- std::this_thread::sleep_for(std::chrono::nanoseconds(timeout * 5));
-
for (size_t i = 0; i < expectedResults.size(); i++) {
expectedResults[i] = {
.requestId = expectedResults[i].requestId,
@@ -1016,6 +1008,7 @@
};
}
+ ASSERT_TRUE(getCallback()->waitForSetValueResults(1, timeout * 100)) << "no set value results";
auto maybeSetValueResults = getCallback()->nextSetValueResults();
ASSERT_TRUE(maybeSetValueResults.has_value()) << "no results in callback";
ASSERT_THAT(maybeSetValueResults.value().payloads, UnorderedElementsAreArray(expectedResults))
@@ -1456,7 +1449,7 @@
std::vector<SubscribeOptions> options = {
{
.propId = GLOBAL_CONTINUOUS_PROP,
- .sampleRate = 20.0,
+ .sampleRate = 100.0,
},
};
@@ -1469,16 +1462,20 @@
ASSERT_TRUE(status.isOk()) << "unsubscribe failed: " << status.getMessage();
+ // Wait for the last events to come.
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+
// Clear existing events.
while (getCallback()->nextOnPropertyEventResults().has_value()) {
// Do nothing.
}
- // Wait for a while, make sure no new events are generated.
+ // Wait for a while, make sure no new events are generated. If still subscribed, this should
+ // generate around 10 events.
std::this_thread::sleep_for(std::chrono::milliseconds(100));
- ASSERT_FALSE(getCallback()->nextOnPropertyEventResults().has_value())
- << "No property event should be generated after unsubscription";
+ ASSERT_EQ(getCallback()->countOnPropertyEventResults(), 0u)
+ << "Property event generation must stop after unsubscription";
}
class SubscribeInvalidOptionsTest
diff --git a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp
index 0e46357..f51ce5c 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp
@@ -16,6 +16,9 @@
#include "MockVehicleCallback.h"
+#include <android-base/thread_annotations.h>
+#include <chrono>
+
namespace android {
namespace hardware {
namespace automotive {
@@ -27,6 +30,7 @@
using ::aidl::android::hardware::automotive::vehicle::SetValueResults;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropErrors;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValues;
+using ::android::base::ScopedLockAssertion;
using ::ndk::ScopedAStatus;
using ::ndk::ScopedFileDescriptor;
@@ -46,21 +50,35 @@
} // namespace
ScopedAStatus MockVehicleCallback::onGetValues(const GetValueResults& results) {
- std::scoped_lock<std::mutex> lockGuard(mLock);
- return storeResults(results, &mGetValueResults);
+ ScopedAStatus result;
+ {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ result = storeResults(results, &mGetValueResults);
+ }
+ mCond.notify_all();
+ return result;
}
ScopedAStatus MockVehicleCallback::onSetValues(const SetValueResults& results) {
- std::scoped_lock<std::mutex> lockGuard(mLock);
- return storeResults(results, &mSetValueResults);
+ ScopedAStatus result;
+ {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ result = storeResults(results, &mSetValueResults);
+ }
+ mCond.notify_all();
+ return result;
}
ScopedAStatus MockVehicleCallback::onPropertyEvent(const VehiclePropValues& results,
int32_t sharedMemoryFileCount) {
- std::scoped_lock<std::mutex> lockGuard(mLock);
-
- mSharedMemoryFileCount = sharedMemoryFileCount;
- return storeResults(results, &mOnPropertyEventResults);
+ ScopedAStatus result;
+ {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ mSharedMemoryFileCount = sharedMemoryFileCount;
+ result = storeResults(results, &mOnPropertyEventResults);
+ }
+ mCond.notify_all();
+ return result;
}
ScopedAStatus MockVehicleCallback::onPropertySetError(const VehiclePropErrors&) {
@@ -87,6 +105,22 @@
return mOnPropertyEventResults.size();
}
+bool MockVehicleCallback::waitForSetValueResults(size_t size, size_t timeoutInNano) {
+ std::unique_lock lk(mLock);
+ return mCond.wait_for(lk, std::chrono::nanoseconds(timeoutInNano), [this, size] {
+ ScopedLockAssertion lockAssertion(mLock);
+ return mSetValueResults.size() >= size;
+ });
+}
+
+bool MockVehicleCallback::waitForGetValueResults(size_t size, size_t timeoutInNano) {
+ std::unique_lock lk(mLock);
+ return mCond.wait_for(lk, std::chrono::nanoseconds(timeoutInNano), [this, size] {
+ ScopedLockAssertion lockAssertion(mLock);
+ return mGetValueResults.size() >= size;
+ });
+}
+
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h
index 0faaa1f..f17b273 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h
+++ b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h
@@ -22,6 +22,7 @@
#include <aidl/android/hardware/automotive/vehicle/BnVehicleCallback.h>
#include <android-base/thread_annotations.h>
+#include <condition_variable>
#include <list>
#include <mutex>
#include <optional>
@@ -63,9 +64,12 @@
std::optional<aidl::android::hardware::automotive::vehicle::VehiclePropValues>
nextOnPropertyEventResults();
size_t countOnPropertyEventResults();
+ bool waitForSetValueResults(size_t size, size_t timeoutInNano);
+ bool waitForGetValueResults(size_t size, size_t timeoutInNano);
private:
std::mutex mLock;
+ std::condition_variable mCond;
std::list<aidl::android::hardware::automotive::vehicle::GetValueResults> mGetValueResults
GUARDED_BY(mLock);
std::list<aidl::android::hardware::automotive::vehicle::SetValueResults> mSetValueResults
diff --git a/automotive/vehicle/aidl/impl/vhal/test/SubscriptionManagerTest.cpp b/automotive/vehicle/aidl/impl/vhal/test/SubscriptionManagerTest.cpp
index eb3c663..cb8c8d1 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/SubscriptionManagerTest.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/SubscriptionManagerTest.cpp
@@ -231,7 +231,7 @@
std::vector<SubscribeOptions> options = {{
.propId = 0,
.areaIds = {0},
- .sampleRate = 10.0,
+ .sampleRate = 100.0,
}};
auto result = getManager()->subscribe(getCallbackClient(), options, true);
@@ -240,11 +240,13 @@
result = getManager()->unsubscribe(getCallbackClient()->asBinder().get());
ASSERT_TRUE(result.ok()) << "failed to unsubscribe: " << result.error().message();
+ // Wait for the last events to come.
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+
clearEvents();
- std::this_thread::sleep_for(std::chrono::milliseconds(200));
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
- // Theoretically trigger 10 times, but check for at least 9 times to be stable.
ASSERT_TRUE(getEvents().empty());
}
@@ -269,6 +271,9 @@
std::vector<int32_t>({0}));
ASSERT_TRUE(result.ok()) << "failed to unsubscribe: " << result.error().message();
+ // Wait for the last events to come.
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+
clearEvents();
std::this_thread::sleep_for(std::chrono::seconds(1));
@@ -301,6 +306,9 @@
result = getManager()->unsubscribe(getCallbackClient()->asBinder().get());
ASSERT_TRUE(result.ok()) << "failed to unsubscribe: " << result.error().message();
+ // Wait for the last events to come.
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+
clearEvents();
std::this_thread::sleep_for(std::chrono::seconds(1));
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl
deleted file mode 100644
index 925f447..0000000
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl
+++ /dev/null
@@ -1,40 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.automotive.vehicle;
-@Backing(type="int") @VintfStability
-enum DriverAttentionMonitoringState {
- OTHER = 0,
- DISTRACTED = 1,
- NOT_DISTRACTED = 2,
-}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/LocationCharacterization.aidl
similarity index 86%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/LocationCharacterization.aidl
index 758b251..27abe41 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/LocationCharacterization.aidl
@@ -33,8 +33,14 @@
package android.hardware.automotive.vehicle;
@Backing(type="int") @VintfStability
-enum DriverAttentionMonitoringWarning {
- OTHER = 0,
- NO_WARNING = 1,
- WARNING = 2,
+enum LocationCharacterization {
+ PRIOR_LOCATIONS = 0x1,
+ GYROSCOPE_FUSION = 0x2,
+ ACCELEROMETER_FUSION = 0x4,
+ COMPASS_FUSION = 0x8,
+ WHEEL_SPEED_FUSION = 0x10,
+ STEERING_ANGLE_FUSION = 0x20,
+ CAR_SPEED_FUSION = 0x40,
+ DEAD_RECKONED = 0x80,
+ RAW_GNSS_ONLY = 0x100,
}
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 a525ab0..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
@@ -189,6 +189,7 @@
GLOVE_BOX_DOOR_POS = (((0x0BF0 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518896 */,
GLOVE_BOX_LOCKED = (((0x0BF1 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 354421745 */,
VEHICLE_MAP_SERVICE = (((0x0C00 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299895808 */,
+ LOCATION_CHARACTERIZATION = (((0x0C10 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410064 */,
OBD2_LIVE_FRAME = (((0x0D00 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896064 */,
OBD2_FREEZE_FRAME = (((0x0D01 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896065 */,
OBD2_FREEZE_FRAME_INFO = (((0x0D02 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896066 */,
@@ -263,10 +264,10 @@
CRUISE_CONTROL_TYPE = (((0x1010 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411088 */,
CRUISE_CONTROL_STATE = (((0x1011 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411089 */,
CRUISE_CONTROL_COMMAND = (((0x1012 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411090 */,
+ CRUISE_CONTROL_TARGET_SPEED = (((0x1013 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291508243 */,
+ ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP = (((0x1014 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411092 */,
+ ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE = (((0x1015 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411093 */,
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/LocationCharacterization.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LocationCharacterization.aidl
new file mode 100644
index 0000000..e06df40
--- /dev/null
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/LocationCharacterization.aidl
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.automotive.vehicle;
+
+/**
+ * Used by LOCATION_CHARACTERIZATION to enumerate the supported bit flags.
+ *
+ * These flags are used to indicate to what transformations are performed on the
+ * GNSS data before the location data is sent, so that location processing
+ * algorithms can take into account prior fusion.
+ *
+ * This enum can be extended in future releases to include additional bit flags.
+ */
+@VintfStability
+@Backing(type="int")
+enum LocationCharacterization {
+ /**
+ * Prior location samples have been used to refine the raw GNSS data (e.g. a
+ * Kalman Filter).
+ */
+ PRIOR_LOCATIONS = 0x1,
+ /**
+ * Gyroscope data has been used to refine the raw GNSS data.
+ */
+ GYROSCOPE_FUSION = 0x2,
+ /**
+ * Accelerometer data has been used to refine the raw GNSS data.
+ */
+ ACCELEROMETER_FUSION = 0x4,
+ /**
+ * Compass data has been used to refine the raw GNSS data.
+ */
+ COMPASS_FUSION = 0x8,
+ /**
+ * Wheel speed has been used to refine the raw GNSS data.
+ */
+ WHEEL_SPEED_FUSION = 0x10,
+ /**
+ * Steering angle has been used to refine the raw GNSS data.
+ */
+ STEERING_ANGLE_FUSION = 0x20,
+ /**
+ * Car speed has been used to refine the raw GNSS data.
+ */
+ CAR_SPEED_FUSION = 0x40,
+ /**
+ * Some effort is made to dead-reckon location. In particular, this means that
+ * relative changes in location have meaning when no GNSS satellite is
+ * available.
+ */
+ DEAD_RECKONED = 0x80,
+ /**
+ * Location is based on GNSS satellite signals without sufficient fusion of
+ * other sensors for complete dead reckoning. This flag should be set when
+ * relative changes to location cannot be relied on when no GNSS satellite is
+ * available.
+ */
+ RAW_GNSS_ONLY = 0x100,
+}
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 b350f90..eeafaaf 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -43,6 +43,8 @@
enum VehicleProperty {
/**
* Undefined property.
+ *
+ * This property must never be used/supported.
*/
INVALID = 0x00000000,
/**
@@ -88,7 +90,17 @@
INFO_FUEL_CAPACITY = 0x0104 + 0x10000000 + 0x01000000
+ 0x00600000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:FLOAT
/**
- * List of fuels the vehicle may use
+ * List of fuels the vehicle may use.
+ *
+ * FuelType::FUEL_TYPE_ELECTRIC must only be included if the vehicle is plug in rechargeable.
+ * For example:
+ * An FHEV (Fully Hybrid Electric Vehicle) must not include FuelType::FUEL_TYPE_ELECTRIC in
+ * INFO_FUEL_TYPE's INT32_VEC value. So INFO_FUEL_TYPE can be populated as such:
+ * int32Values = { FuelType::FUEL_TYPE_UNLEADED }
+ * On the other hand, a PHEV (Partially Hybrid Electric Vehicle) is plug in rechargeable, and
+ * hence should include FuelType::FUEL_TYPE_ELECTRIC in INFO_FUEL_TYPE's INT32_VEC value. So
+ * INFO_FUEL_TYPE can be populated as such:
+ * int32Values = { FuelType::FUEL_TYPE_UNLEADED, FuelType::FUEL_TYPE_ELECTRIC }
*
* @change_mode VehiclePropertyChangeMode.STATIC
* @access VehiclePropertyAccess.READ
@@ -296,7 +308,10 @@
* configArray is used to indicate the micrometers-per-wheel-tick value and
* which wheels are supported. configArray is set as follows:
*
- * configArray[0], bits [0:3] = supported wheels. Uses enum Wheel.
+ * configArray[0], bits [0:3] = supported wheels. Uses enum Wheel. For example, if all wheels
+ * are supported, then configArray[0] = VehicleAreaWheel::LEFT_FRONT
+ * | VehicleAreaWheel::RIGHT_FRONT | VehicleAreaWheel::LEFT_REAR
+ * | VehicleAreaWheel::RIGHT_REAR
* configArray[1] = micrometers per front left wheel tick
* configArray[2] = micrometers per front right wheel tick
* configArray[3] = micrometers per rear right wheel tick
@@ -392,6 +407,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 may be writable 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 set to
+ * VehiclePropertyAccess.READ only at the OEM's discretion.
+ *
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ_WRITE
* @unit VehicleUnit:METER
@@ -619,10 +638,10 @@
/**
* HVAC Properties
*
- * Additional rules for mapping a zoned HVAC property (except
- * HVAC_MAX_DEFROST_ON) to AreaIDs:
- * - Every seat in VehicleAreaSeat that is available in the car, must be
- * part of an AreaID in the AreaID array.
+ * Additional rules for mapping non-GLOBAL VehicleArea type HVAC properties
+ * to AreaIDs:
+ * - Every “area” for a specific VehicleArea type that is affected by the
+ * property, must be included in an area ID for that property.
*
* Example 1: A car has two front seats (ROW_1_LEFT, ROW_1_RIGHT) and three
* back seats (ROW_2_LEFT, ROW_2_CENTER, ROW_2_RIGHT). There are two
@@ -651,6 +670,16 @@
* - ROW_1_RIGHT
* - ROW_2_LEFT | ROW_2_CENTER | ROW_2_RIGHT | ROW_3_LEFT | ROW_3_CENTER | ROW_3_RIGHT
*
+ * Example 3: A car has two front seats (ROW_1_LEFT, ROW_1_RIGHT) and three
+ * back seats (ROW_2_LEFT, ROW_2_CENTER, ROW_2_RIGHT). Suppose the car
+ * supports HVAC_AUTO_ON for just the two front seats.
+ * - A valid mapping set of AreaIDs for HVAC_AUTO_ON would be:
+ * - ROW_1_LEFT | ROW_1_RIGHT
+ * - If HVAC_AUTO_ON had two separate control units for the driver side
+ * and passenger side, an alternative mapping would be:
+ * - ROW_1_LEFT
+ * - ROW_1_RIGHT
+ *
*
* Fan speed setting
*
@@ -1571,11 +1600,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
@@ -1936,7 +1965,8 @@
* Represents property for Seat easy access feature.
*
* If true, the seat will automatically adjust to make it easier for the occupant to enter and
- * exit the vehicle.
+ * 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.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -2136,6 +2166,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ
+ * @unit VehicleUnit:MILLI_SECS
*/
WINDSHIELD_WIPERS_PERIOD =
0x0BC5 + VehiclePropertyGroup.SYSTEM + VehicleArea.WINDOW + VehiclePropertyType.INT32,
@@ -2348,6 +2379,20 @@
VEHICLE_MAP_SERVICE = 0x0C00 + 0x10000000 + 0x01000000
+ 0x00e00000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:MIXED
/**
+ * Characterization of inputs used for computing location.
+ *
+ * This property must indicate what (if any) data and sensor inputs are considered by the system
+ * 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.
+ *
+ * @change_mode VehiclePropertyChangeMode.STATIC
+ * @access VehiclePropertyAccess.READ
+ */
+ LOCATION_CHARACTERIZATION =
+ 0x0C10 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
+ /**
* OBD2 Live Sensor Data
*
* Reports a snapshot of the current (live) values of the OBD2 sensors available.
@@ -3592,7 +3637,7 @@
**********************************************************************************************/
/**
- * Enable or disable automatic emergency braking (AEB).
+ * Enable or disable Automatic Emergency Braking (AEB).
*
* Set true to enable AEB and false to disable AEB. When AEB is enabled, the ADAS system in the
* vehicle should be turned on and monitoring to avoid potential collisions.
@@ -3634,7 +3679,7 @@
0x1001 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
- * Enable or disable forward collision warning (FCW).
+ * Enable or disable Forward Collision Warning (FCW).
*
* Set true to enable FCW and false to disable FCW. When FCW is enabled, the ADAS system in the
* vehicle should be turned on and monitoring for potential collisions.
@@ -3673,7 +3718,7 @@
0x1003 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
- * Enable and disable blind spot warning (BSW).
+ * Enable and disable Blind Spot Warning (BSW).
*
* Set true to enable BSW and false to disable BSW. When BSW is enabled, the ADAS system in the
* vehicle should be turned on and monitoring for objects in the vehicle’s blind spots.
@@ -3712,7 +3757,7 @@
0x1005 + VehiclePropertyGroup.SYSTEM + VehicleArea.MIRROR + VehiclePropertyType.INT32,
/**
- * Enable or disable lane departure warning (LDW).
+ * Enable or disable Lane Departure Warning (LDW).
*
* Set true to enable LDW and false to disable LDW. When LDW is enabled, the ADAS system in the
* vehicle should be turned on and monitoring if the vehicle is approaching or crossing lane
@@ -3799,7 +3844,7 @@
0x1009 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
- * Enable or disable lane centering assist (LCA).
+ * Enable or disable Lane Centering Assist (LCA).
*
* Set true to enable LCA and false to disable LCA. When LCA is enabled, the ADAS system in the
* vehicle should be turned on and waiting for an activation signal from the driver. Once the
@@ -3871,13 +3916,18 @@
0x100C + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/*
- * Enable or disable emergency lane keep assist (ELKA).
+ * Enable or disable Emergency Lane Keep Assist (ELKA).
*
* Set true to enable ELKA and false to disable ELKA. When ELKA is enabled, the ADAS system in
* the vehicle should be on and monitoring for unsafe lane changes by the driver. When an unsafe
* maneuver is detected, ELKA alerts the driver and applies steering corrections to keep the
* vehicle in its original lane.
*
+ * In general, EMERGENCY_LANE_KEEP_ASSIST_ENABLED should always return true or false. If the
+ * feature is not available due to some temporary state, such as the vehicle speed being too
+ * 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.
*
@@ -3916,6 +3966,11 @@
* When CC is enabled, the ADAS system in the vehicle should be turned on and responding to
* commands.
*
+ * In general, CRUISE_CONTROL_ENABLED should always return true or false. If the feature is not
+ * available due to some temporary state, such as the vehicle speed being too low, that
+ * 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.
*
@@ -3986,12 +4041,79 @@
0x1012 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
- * Enable or disable hands on detection (HOD).
+ * Current target speed for Cruise Control (CC).
+ *
+ * OEMs should set the minInt32Value and maxInt32Value values for this property to define the
+ * min and max target speed values. These values must be non-negative.
+ *
+ * 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.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ
+ * @unit VehicleUnit:METER_PER_SEC
+ */
+ CRUISE_CONTROL_TARGET_SPEED =
+ 0x1013 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.FLOAT,
+
+ /**
+ * Current target time gap for Adaptive Cruise Control (ACC) or Predictive Cruise Control in
+ * milliseconds.
+ *
+ * This property should specify the target time gap to a leading vehicle. This gap is defined as
+ * the time to travel the distance between the leading vehicle's rear-most point to the ACC
+ * vehicle's front-most point. The actual time gap from a leading vehicle can be above or below
+ * this value.
+ *
+ * The possible values to set for the target time gap should be specified in configArray in
+ * 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.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ_WRITE
+ * @unit VehicleUnit:MILLI_SECS
+ */
+ ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP =
+ 0x1014 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
+
+ /**
+ * Measured distance from leading vehicle when using Adaptive Cruise Control (ACC) or
+ * Predictive Cruise Control.
+ *
+ * Returns the measured distance in millimeters between the rear-most point of the leading
+ * vehicle and the front-most point of the ACC vehicle.
+ *
+ * The minInt32Value should be 0.
+ * The maxInt32Value should be populated with the maximum range the distance sensor can support.
+ * This value should be non-negative.
+ *
+ * When no lead vehicle is detected (that is, when there is no leading vehicle or the leading
+ * vehicle is too far away for the sensor to detect), this property should return
+ * StatusCode.NOT_AVAILABLE.
+ *
+ * @change_mode VehiclePropertyChangeMode.CONTINUOUS
+ * @access VehiclePropertyAccess.READ
+ * @unit VehicleUnit:MILLIMETER
+ */
+ ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE =
+ 0x1015 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
+
+ /**
+ * Enable or disable Hands On Detection (HOD).
*
* Set true to enable HOD and false to disable HOD. When HOD is enabled, a system inside the
* vehicle should be monitoring the presence of the driver's hands on the steering wheel and
* send a warning if it detects that the driver's hands are no longer on the steering wheel.
*
+ * In general, HANDS_ON_DETECTION_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 HANDS_ON_DETECTION_STATE property.
+ *
* This property is defined as read_write, but OEMs have the option to implement it as read
* only.
*
@@ -4002,7 +4124,7 @@
0x1016 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
/**
- * Hands on detection (HOD) driver state.
+ * Hands On Detection (HOD) driver state.
*
* Returns whether the driver's hands are on the steering wheel. Generally, this property should
* return a valid state defined in the HandsOnDetectionDriverState or ErrorState. For example,
@@ -4026,7 +4148,7 @@
0x1017 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
/**
- * Hands on detection (HOD) warning.
+ * Hands On Detection (HOD) warning.
*
* Returns whether a warning is being sent to the driver for having their hands off the wheel
* for too long a duration.
@@ -4047,68 +4169,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.
- *
- * 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 51cc376..8bcad1e 100644
--- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
+++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
@@ -296,6 +296,30 @@
ASSERT_EQ(setValueResult.error().code(), ErrorCode::ACCESS_DENIED_FROM_VHAL);
}
+// Test get(), set() and getAllPropConfigs() on VehicleProperty::INVALID.
+TEST_P(VtsHalAutomotiveVehicleTargetTest, getSetPropertyIdInvalid) {
+ ALOGD("VtsHalAutomotiveVehicleTargetTest::getSetPropertyIdInvalid");
+
+ int32_t propId = toInt(VehicleProperty::INVALID);
+ auto getValueResult = mVhalClient->getValueSync(*mVhalClient->createHalPropValue(propId));
+ ASSERT_FALSE(getValueResult.ok()) << "Expect get on VehicleProperty::INVALID to fail";
+ ASSERT_EQ(getValueResult.error().code(), ErrorCode::INVALID_ARG);
+
+ auto propToSet = mVhalClient->createHalPropValue(propId);
+ propToSet->setInt32Values({0});
+ auto setValueResult = mVhalClient->setValueSync(*propToSet);
+ ASSERT_FALSE(setValueResult.ok()) << "Expect set on VehicleProperty::INVALID to fail";
+ ASSERT_EQ(setValueResult.error().code(), ErrorCode::INVALID_ARG);
+
+ auto result = mVhalClient->getAllPropConfigs();
+ ASSERT_TRUE(result.ok());
+ for (const auto& cfgPtr : result.value()) {
+ const IHalPropConfig& cfg = *cfgPtr;
+ ASSERT_FALSE(cfg.getPropId() == propId) << "Expect VehicleProperty::INVALID to not be "
+ "included in propConfigs";
+ }
+}
+
// Test subscribe() and unsubscribe().
TEST_P(VtsHalAutomotiveVehicleTargetTest, subscribeAndUnsubscribe) {
ALOGD("VtsHalAutomotiveVehicleTargetTest::subscribeAndUnsubscribe");
@@ -498,6 +522,12 @@
actualPropertyType);
}
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLocationCharacterizationConfig) {
+ verifyProperty(VehicleProperty::LOCATION_CHARACTERIZATION, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::STATIC, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::INT32);
+}
+
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyEmergencyLaneKeepAssistEnabledConfig) {
verifyProperty(VehicleProperty::EMERGENCY_LANE_KEEP_ASSIST_ENABLED,
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
@@ -534,6 +564,25 @@
VehicleArea::GLOBAL, VehiclePropertyType::INT32);
}
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyCruiseControlTargetSpeedConfig) {
+ verifyProperty(VehicleProperty::CRUISE_CONTROL_TARGET_SPEED, VehiclePropertyAccess::READ,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::FLOAT);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyAdaptiveCruiseControlTargetTimeGapConfig) {
+ verifyProperty(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP,
+ VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
+ VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
+}
+
+TEST_P(VtsHalAutomotiveVehicleTargetTest,
+ verifyAdaptiveCruiseControlLeadVehicleMeasuredDistanceConfig) {
+ verifyProperty(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE,
+ VehiclePropertyAccess::READ, VehiclePropertyChangeMode::CONTINUOUS,
+ VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
+}
+
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyHandsOnDetectionEnabledConfig) {
verifyProperty(VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess::READ_WRITE,
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
@@ -552,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/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/AuthenticateReason.aidl
similarity index 65%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/AuthenticateReason.aidl
index 758b251..f639ead 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/AuthenticateReason.aidl
@@ -31,10 +31,33 @@
// 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.biometrics.common;
+/* @hide */
+@VintfStability
+union AuthenticateReason {
+ android.hardware.biometrics.common.AuthenticateReason.Vendor vendorAuthenticateReason;
+ android.hardware.biometrics.common.AuthenticateReason.Face faceAuthenticateReason;
+ android.hardware.biometrics.common.AuthenticateReason.Fingerprint fingerprintAuthenticateReason;
+ @VintfStability
+ parcelable Vendor {
+ ParcelableHolder extension;
+ }
+ @Backing(type="int") @VintfStability
+ enum Fingerprint {
+ UNKNOWN,
+ }
+ @Backing(type="int") @VintfStability
+ enum Face {
+ UNKNOWN,
+ STARTED_WAKING_UP,
+ PRIMARY_BOUNCER_SHOWN,
+ ASSISTANT_VISIBLE,
+ ALTERNATE_BIOMETRIC_BOUNCER_SHOWN,
+ NOTIFICATION_PANEL_CLICKED,
+ OCCLUDING_APP_REQUESTED,
+ PICK_UP_GESTURE_TRIGGERED,
+ QS_EXPANDED,
+ SWIPE_UP_ON_BOUNCER,
+ UDFPS_POINTER_DOWN,
+ }
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/DisplayState.aidl
similarity index 92%
rename from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
rename to biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/DisplayState.aidl
index 758b251..176e8d6 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/DisplayState.aidl
@@ -31,10 +31,13 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.automotive.vehicle;
+package android.hardware.biometrics.common;
+/* @hide */
@Backing(type="int") @VintfStability
-enum DriverAttentionMonitoringWarning {
- OTHER = 0,
- NO_WARNING = 1,
- WARNING = 2,
+enum DisplayState {
+ UNKNOWN,
+ LOCKSCREEN,
+ NO_UI,
+ SCREENSAVER,
+ AOD,
}
diff --git a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl
index 305e422..378017e 100644
--- a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl
+++ b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl
@@ -37,7 +37,12 @@
parcelable OperationContext {
int id = 0;
android.hardware.biometrics.common.OperationReason reason = android.hardware.biometrics.common.OperationReason.UNKNOWN;
+ /**
+ * @deprecated use displayState instead.
+ */
boolean isAod = false;
boolean isCrypto = false;
android.hardware.biometrics.common.WakeReason wakeReason = android.hardware.biometrics.common.WakeReason.UNKNOWN;
+ android.hardware.biometrics.common.DisplayState displayState = android.hardware.biometrics.common.DisplayState.UNKNOWN;
+ @nullable android.hardware.biometrics.common.AuthenticateReason authenticateReason;
}
diff --git a/biometrics/common/aidl/android/hardware/biometrics/common/AuthenticateReason.aidl b/biometrics/common/aidl/android/hardware/biometrics/common/AuthenticateReason.aidl
new file mode 100644
index 0000000..fcf5294
--- /dev/null
+++ b/biometrics/common/aidl/android/hardware/biometrics/common/AuthenticateReason.aidl
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.common;
+
+/**
+ * Reason for an authenticate operation.
+ *
+ * @hide
+ */
+@VintfStability
+union AuthenticateReason {
+ /** Vendor reason for invoking an authenticate operation. */
+ @VintfStability
+ parcelable Vendor {
+ ParcelableHolder extension;
+ }
+
+ /** Reason for invoking fingerprint authentication. */
+ @VintfStability
+ @Backing(type="int")
+ enum Fingerprint {
+ UNKNOWN,
+ }
+
+ /** Reason for invoking face authentication. */
+ @VintfStability
+ @Backing(type="int")
+ enum Face {
+ UNKNOWN,
+ STARTED_WAKING_UP,
+ PRIMARY_BOUNCER_SHOWN,
+ ASSISTANT_VISIBLE,
+ ALTERNATE_BIOMETRIC_BOUNCER_SHOWN,
+ NOTIFICATION_PANEL_CLICKED,
+ OCCLUDING_APP_REQUESTED,
+ PICK_UP_GESTURE_TRIGGERED,
+ QS_EXPANDED,
+ SWIPE_UP_ON_BOUNCER,
+ UDFPS_POINTER_DOWN,
+ }
+
+ AuthenticateReason.Vendor vendorAuthenticateReason;
+ AuthenticateReason.Face faceAuthenticateReason;
+ AuthenticateReason.Fingerprint fingerprintAuthenticateReason;
+}
diff --git a/biometrics/common/aidl/android/hardware/biometrics/common/DisplayState.aidl b/biometrics/common/aidl/android/hardware/biometrics/common/DisplayState.aidl
new file mode 100644
index 0000000..d01eac8
--- /dev/null
+++ b/biometrics/common/aidl/android/hardware/biometrics/common/DisplayState.aidl
@@ -0,0 +1,41 @@
+/*
+ * 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.biometrics.common;
+
+/**
+ * Display state during an operation.
+ *
+ * @hide
+ */
+@VintfStability
+@Backing(type="int")
+enum DisplayState {
+ /** The display state is unknown. */
+ UNKNOWN,
+
+ /** The display is on and showing the lockscreen (or an occluding app). */
+ LOCKSCREEN,
+
+ /** The display is off or dozing. */
+ NO_UI,
+
+ /** The display is showing a screensaver (dreaming). */
+ SCREENSAVER,
+
+ /** The display is dreaming with always on display. */
+ AOD,
+}
diff --git a/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl b/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl
index a8f768d..f4191d7 100644
--- a/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl
+++ b/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl
@@ -16,6 +16,8 @@
package android.hardware.biometrics.common;
+import android.hardware.biometrics.common.AuthenticateReason;
+import android.hardware.biometrics.common.DisplayState;
import android.hardware.biometrics.common.OperationReason;
import android.hardware.biometrics.common.WakeReason;
@@ -43,7 +45,7 @@
*/
OperationReason reason = OperationReason.UNKNOWN;
- /* Flag indicating that the display is in AOD mode. */
+ /** @deprecated use displayState instead. */
boolean isAod = false;
/** Flag indicating that crypto was requested. */
@@ -58,4 +60,15 @@
* policy.
*/
WakeReason wakeReason = WakeReason.UNKNOWN;
+
+ /** The current display state. */
+ DisplayState displayState = DisplayState.UNKNOWN;
+
+ /**
+ * An associated reason for an authenticate operation.
+ *
+ * This should be interpreted as a hint to enable optimizations or tracing. The
+ * framework may choose to omit the reason at any time based on the device's policy.
+ */
+ @nullable AuthenticateReason authenticateReason;
}
diff --git a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl
index 89f76f4..7075f71 100644
--- a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl
+++ b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl
@@ -49,4 +49,5 @@
IMMOBILE,
RETRYING_CAPTURE,
LIFT_TOO_SOON,
+ POWER_PRESS,
}
diff --git a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/Error.aidl b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/Error.aidl
index d3592a1..9eeaac5 100644
--- a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/Error.aidl
+++ b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/Error.aidl
@@ -44,4 +44,5 @@
UNABLE_TO_REMOVE,
VENDOR,
BAD_CALIBRATION,
+ POWER_PRESS,
}
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl
index 2cdc196..41b7c5e 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/AcquiredInfo.aidl
@@ -103,4 +103,10 @@
* Fingerprint was lifted before the capture completed.
*/
LIFT_TOO_SOON,
+
+ /**
+ * Indicates a power press event has occurred. This is typically sent by fingerprint
+ * sensors that have the sensor co-located with the power button.
+ */
+ POWER_PRESS,
}
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl
index d8d47fa..39a5676 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl
@@ -70,4 +70,10 @@
* There's a problem with the sensor's calibration.
*/
BAD_CALIBRATION,
+
+ /**
+ * Indicates a power press event has occurred. This is typically sent by fingerprint
+ * sensors that have the sensor co-located with the power button.
+ */
+ POWER_PRESS,
}
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index 8ea1ddd..9451087 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -516,12 +516,15 @@
// Return the number of completed packets reported by the controller.
int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) {
int packets_processed = 0;
- wait_for_event(false);
- if (event_queue.size() == 0) {
- ALOGW("%s: WaitForCallback timed out.", __func__);
- return packets_processed;
- }
- while (event_queue.size() > 0) {
+ while (true) {
+ // There should be at least one event.
+ wait_for_event(packets_processed == 0);
+ if (event_queue.empty()) {
+ if (packets_processed == 0) {
+ ALOGW("%s: WaitForCallback timed out.", __func__);
+ }
+ return packets_processed;
+ }
hidl_vec<uint8_t> event = event_queue.front();
event_queue.pop();
diff --git a/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.cpp b/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.cpp
index 9ae3837..28ac603 100644
--- a/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.cpp
+++ b/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.cpp
@@ -539,12 +539,15 @@
// Return the number of completed packets reported by the controller.
int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) {
int packets_processed = 0;
- wait_for_event(false);
- if (event_queue.size() == 0) {
- ALOGW("%s: WaitForCallback timed out.", __func__);
- return packets_processed;
- }
- while (event_queue.size() > 0) {
+ while (true) {
+ // There should be at least one event.
+ wait_for_event(packets_processed == 0);
+ if (event_queue.empty()) {
+ if (packets_processed == 0) {
+ ALOGW("%s: WaitForCallback timed out.", __func__);
+ }
+ return packets_processed;
+ }
hidl_vec<uint8_t> event = event_queue.front();
event_queue.pop();
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl
index 899b8ca..e548cd3 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl
@@ -39,4 +39,5 @@
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
boolean variableBitRateSupported;
byte[] bitsPerSample;
+ boolean adaptiveBitRateSupported;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacConfiguration.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacConfiguration.aidl
index 6adef6d..29ab8ce 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacConfiguration.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacConfiguration.aidl
@@ -39,4 +39,5 @@
android.hardware.bluetooth.audio.ChannelMode channelMode;
boolean variableBitRateEnabled;
byte bitsPerSample;
+ boolean adaptiveBitRateSupported;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteFeature.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxAdaptiveLeCapabilities.aidl
similarity index 85%
rename from radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteFeature.aidl
rename to bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxAdaptiveLeCapabilities.aidl
index 315359d..c9d3cde 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteFeature.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxAdaptiveLeCapabilities.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright 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.
@@ -31,11 +31,12 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.radio.satellite;
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
-enum SatelliteFeature {
- SOS_SMS = 0,
- EMERGENCY_SMS = 1,
- SMS = 2,
- LOCATION_SHARING = 3,
+package android.hardware.bluetooth.audio;
+@VintfStability
+parcelable AptxAdaptiveLeCapabilities {
+ byte[] pcmBitDepth;
+ int[] samplingFrequencyHz;
+ int[] frameDurationUs;
+ int[] octetsPerFrame;
+ byte[] blocksPerSdu;
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxAdaptiveLeConfiguration.aidl
similarity index 85%
copy from wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl
copy to bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxAdaptiveLeConfiguration.aidl
index ea86c4f..76df4ed 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxAdaptiveLeConfiguration.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright 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.
@@ -31,8 +31,13 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.wifi;
+package android.hardware.bluetooth.audio;
@VintfStability
-parcelable WifiRadioCombinationMatrix {
- android.hardware.wifi.WifiRadioCombination[] radioCombinations;
+parcelable AptxAdaptiveLeConfiguration {
+ byte pcmBitDepth;
+ int samplingFrequencyHz;
+ int frameDurationUs;
+ int octetsPerFrame;
+ byte blocksPerSdu;
+ int codecMode;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl
index d1723e6..3e204f9 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl
@@ -44,4 +44,6 @@
VENDOR = 7,
APTX_ADAPTIVE = 8,
OPUS = 9,
+ APTX_ADAPTIVE_LE = 10,
+ APTX_ADAPTIVE_LEX = 11,
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl
index bb3d7e4..031ee67 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl
@@ -36,6 +36,7 @@
union LeAudioCodecConfiguration {
android.hardware.bluetooth.audio.Lc3Configuration lc3Config;
android.hardware.bluetooth.audio.LeAudioCodecConfiguration.VendorConfiguration vendorConfig;
+ android.hardware.bluetooth.audio.AptxAdaptiveLeConfiguration aptxAdaptiveLeConfig;
@VintfStability
parcelable VendorConfiguration {
ParcelableHolder extension;
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl
index 679655c..2d9ebae 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl
@@ -38,6 +38,7 @@
android.hardware.bluetooth.audio.LeAudioConfiguration.StreamMap[] streamMap;
int peerDelayUs;
android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCodecConfig;
+ @nullable byte[] vendorSpecificMetadata;
@VintfStability
parcelable StreamMap {
char streamHandle;
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusCapabilities.aidl
index 2781893..2c04b0f 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusCapabilities.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusCapabilities.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Android Open Source Project
+ * Copyright 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.
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusConfiguration.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusConfiguration.aidl
index 067690e..811d32a 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusConfiguration.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/OpusConfiguration.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Android Open Source Project
+ * Copyright 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.
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl
index 130fef9..894a2f3 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl
@@ -47,5 +47,6 @@
union LeAudioCodecCapabilities {
android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities;
android.hardware.bluetooth.audio.UnicastCapability.VendorCapabilities vendorCapabillities;
+ android.hardware.bluetooth.audio.AptxAdaptiveLeCapabilities aptxAdaptiveLeCapabilities;
}
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl
index c4153e9..d7d67de 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl
@@ -29,4 +29,5 @@
ChannelMode[] channelMode;
boolean variableBitRateSupported;
byte[] bitsPerSample;
+ boolean adaptiveBitRateSupported;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacConfiguration.aidl
index 30338e7..34998cd 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacConfiguration.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacConfiguration.aidl
@@ -29,4 +29,5 @@
ChannelMode channelMode;
boolean variableBitRateEnabled;
byte bitsPerSample;
+ boolean adaptiveBitRateSupported;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeCapabilities.aidl
new file mode 100644
index 0000000..b3fe71c
--- /dev/null
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeCapabilities.aidl
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.audio;
+
+/**
+ * Used for Hardware Encoding/Decoding Aptx Adaptive LE codec capabilities.
+ */
+@VintfStability
+parcelable AptxAdaptiveLeCapabilities {
+ /*
+ * PCM is Input for encoder, Output for decoder
+ */
+ byte[] pcmBitDepth;
+ /*
+ * codec-specific parameters
+ */
+ int[] samplingFrequencyHz;
+ /*
+ * FrameDuration based on microseconds.
+ */
+ int[] frameDurationUs;
+ /*
+ * length in octets of a codec frame
+ */
+ int[] octetsPerFrame;
+ /*
+ * Number of blocks of codec frames per single SDU (Service Data Unit)
+ */
+ byte[] blocksPerSdu;
+}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeConfiguration.aidl
new file mode 100644
index 0000000..060d5d5
--- /dev/null
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeConfiguration.aidl
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.audio;
+
+/**
+ * Used for Hardware Encoding/Decoding Aptx Adaptive LE/LEX codec configuration.
+ */
+@VintfStability
+parcelable AptxAdaptiveLeConfiguration {
+ /*
+ * PCM is Input for encoder, Output for decoder
+ */
+ byte pcmBitDepth;
+ /*
+ * codec-specific parameters
+ */
+ int samplingFrequencyHz;
+ /*
+ * FrameDuration based on microseconds.
+ */
+ int frameDurationUs;
+ /*
+ * length in octets of a codec frame
+ */
+ int octetsPerFrame;
+ /*
+ * Number of blocks of codec frames per single SDU (Service Data Unit)
+ */
+ byte blocksPerSdu;
+ /*
+ * Currently being used for Aptx Adaptive LEX,
+ * RFU for Aptx Adaptive LE
+ * Based on this value, the codec will determine the quality of stream
+ * during initialization for Music/Game
+ */
+ int codecMode;
+}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl
index 3499155..1d8acdf 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl
@@ -29,4 +29,6 @@
VENDOR,
APTX_ADAPTIVE,
OPUS,
+ APTX_ADAPTIVE_LE,
+ APTX_ADAPTIVE_LEX,
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl
index 421eeb2..7ce6ff3 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.aidl
@@ -17,6 +17,7 @@
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.Lc3Configuration;
+import android.hardware.bluetooth.audio.AptxAdaptiveLeConfiguration;
@VintfStability
union LeAudioCodecConfiguration {
@@ -26,4 +27,5 @@
}
Lc3Configuration lc3Config;
VendorConfiguration vendorConfig;
+ AptxAdaptiveLeConfiguration aptxAdaptiveLeConfig;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl
index f22f309..7302aea 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.aidl
@@ -44,4 +44,16 @@
StreamMap[] streamMap;
int peerDelayUs;
LeAudioCodecConfiguration leAudioCodecConfig;
+
+ /*
+ * Bluetooth LTV format for vendor metadata is defined in the
+ * Section 6.12.6.9 Vendor_Specific of Bluetooth Assigned Numbers
+ *
+ * Octet 0 = Length
+ * Octet 1 = Type (Vendor specific - 0xFF)
+ * Octet 2-3 = Company_ID
+ * Company ID values are defined in Bluetooth Assigned Numbers.
+ * Octet 4 onwards = Vendor specific Metadata
+ */
+ @nullable byte[] vendorSpecificMetadata;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl
index f8a924a..07688a7 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl
@@ -19,6 +19,7 @@
import android.hardware.bluetooth.audio.AudioLocation;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Capabilities;
+import android.hardware.bluetooth.audio.AptxAdaptiveLeCapabilities;
/**
* Used to specify the le audio unicast codec capabilities for hardware offload.
@@ -33,6 +34,7 @@
union LeAudioCodecCapabilities {
Lc3Capabilities lc3Capabilities;
VendorCapabilities vendorCapabillities;
+ AptxAdaptiveLeCapabilities aptxAdaptiveLeCapabilities;
}
CodecType codecType;
AudioLocation supportedChannel;
diff --git a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
index 6a913f7..858fa38 100644
--- a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
+++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
@@ -35,6 +35,8 @@
using aidl::android::hardware::audio::common::SourceMetadata;
using aidl::android::hardware::bluetooth::audio::AacCapabilities;
using aidl::android::hardware::bluetooth::audio::AacConfiguration;
+using aidl::android::hardware::bluetooth::audio::AptxAdaptiveLeCapabilities;
+using aidl::android::hardware::bluetooth::audio::AptxAdaptiveLeConfiguration;
using aidl::android::hardware::bluetooth::audio::AptxCapabilities;
using aidl::android::hardware::bluetooth::audio::AptxConfiguration;
using aidl::android::hardware::bluetooth::audio::AudioCapabilities;
@@ -87,10 +89,6 @@
static constexpr int8_t a2dp_bits_per_samples[] = {0, 16, 24, 32};
static constexpr ChannelMode a2dp_channel_modes[] = {
ChannelMode::UNKNOWN, ChannelMode::MONO, ChannelMode::STEREO};
-static constexpr CodecType a2dp_codec_types[] = {
- CodecType::UNKNOWN, CodecType::SBC, CodecType::AAC,
- CodecType::APTX, CodecType::APTX_HD, CodecType::LDAC,
- CodecType::LC3, CodecType::APTX_ADAPTIVE};
static std::vector<LatencyMode> latency_modes = {LatencyMode::FREE};
// Helpers
@@ -238,6 +236,8 @@
CodecCapabilities::Capabilities::opusCapabilities);
break;
case CodecType::APTX_ADAPTIVE:
+ case CodecType::APTX_ADAPTIVE_LE:
+ case CodecType::APTX_ADAPTIVE_LEX:
case CodecType::LC3:
case CodecType::VENDOR:
case CodecType::UNKNOWN:
@@ -387,6 +387,11 @@
variable_bit_rate_enableds.push_back(true);
}
+ std::vector<bool> adaptive_bit_rate_supporteds = {false};
+ if (aac_capability.adaptiveBitRateSupported) {
+ adaptive_bit_rate_supporteds.push_back(true);
+ }
+
// combine those parameters into one list of
// CodecConfiguration::CodecSpecific
for (auto object_type : aac_capability.objectType) {
@@ -394,14 +399,18 @@
for (auto channel_mode : aac_capability.channelMode) {
for (int8_t bits_per_sample : aac_capability.bitsPerSample) {
for (auto variable_bit_rate_enabled : variable_bit_rate_enableds) {
- AacConfiguration aac_data{
- .objectType = object_type,
- .sampleRateHz = sample_rate,
- .channelMode = channel_mode,
- .variableBitRateEnabled = variable_bit_rate_enabled,
- .bitsPerSample = bits_per_sample};
- aac_codec_specifics.push_back(
- CodecConfiguration::CodecSpecific(aac_data));
+ for (auto adaptive_bit_rate_supported :
+ adaptive_bit_rate_supporteds) {
+ AacConfiguration aac_data{
+ .objectType = object_type,
+ .sampleRateHz = sample_rate,
+ .channelMode = channel_mode,
+ .variableBitRateEnabled = variable_bit_rate_enabled,
+ .bitsPerSample = bits_per_sample,
+ .adaptiveBitRateSupported = adaptive_bit_rate_supported};
+ aac_codec_specifics.push_back(
+ CodecConfiguration::CodecSpecific(aac_data));
+ }
}
}
}
@@ -845,7 +854,7 @@
ASSERT_NE(audio_provider_, nullptr);
std::vector<CodecConfiguration::CodecSpecific> codec_specifics;
- for (auto codec_type : a2dp_codec_types) {
+ for (auto codec_type : ndk::enum_range<CodecType>()) {
switch (codec_type) {
case CodecType::SBC:
codec_specifics = GetSbcCodecSpecificSupportedList(false);
@@ -866,6 +875,8 @@
codec_specifics = GetOpusCodecSpecificSupportedList(false);
continue;
case CodecType::APTX_ADAPTIVE:
+ case CodecType::APTX_ADAPTIVE_LE:
+ case CodecType::APTX_ADAPTIVE_LEX:
case CodecType::LC3:
case CodecType::VENDOR:
case CodecType::UNKNOWN:
@@ -1192,6 +1203,73 @@
return le_audio_codec_configs;
}
+ static constexpr int32_t apx_adaptive_le_config_codec_modes[] = {0, 1, 2, 3};
+
+ std::vector<AptxAdaptiveLeConfiguration>
+ GetUnicastAptxAdaptiveLeSupportedList(bool decoding, bool supported,
+ bool is_le_extended) {
+ std::vector<AptxAdaptiveLeConfiguration> le_audio_codec_configs;
+ if (!supported) {
+ AptxAdaptiveLeConfiguration aptx_adaptive_le_config{
+ .pcmBitDepth = 0, .samplingFrequencyHz = 0};
+ le_audio_codec_configs.push_back(aptx_adaptive_le_config);
+ return le_audio_codec_configs;
+ }
+
+ // There might be more than one LeAudioCodecCapabilitiesSetting
+ std::vector<AptxAdaptiveLeCapabilities> aptx_adaptive_le_capabilities;
+ for (auto& capability : temp_provider_capabilities_) {
+ if (capability.getTag() != AudioCapabilities::leAudioCapabilities) {
+ continue;
+ }
+ auto& le_audio_capability =
+ capability.get<AudioCapabilities::leAudioCapabilities>();
+ auto& unicast_capability =
+ decoding ? le_audio_capability.unicastDecodeCapability
+ : le_audio_capability.unicastEncodeCapability;
+ if ((!is_le_extended &&
+ unicast_capability.codecType != CodecType::APTX_ADAPTIVE_LE) ||
+ (is_le_extended &&
+ unicast_capability.codecType != CodecType::APTX_ADAPTIVE_LEX)) {
+ continue;
+ }
+
+ auto& aptx_adaptive_le_capability =
+ unicast_capability.leAudioCodecCapabilities
+ .get<UnicastCapability::LeAudioCodecCapabilities::
+ aptxAdaptiveLeCapabilities>();
+
+ aptx_adaptive_le_capabilities.push_back(aptx_adaptive_le_capability);
+ }
+
+ for (auto& aptx_adaptive_le_capability : aptx_adaptive_le_capabilities) {
+ for (int32_t samplingFrequencyHz :
+ aptx_adaptive_le_capability.samplingFrequencyHz) {
+ for (int32_t frameDurationUs :
+ aptx_adaptive_le_capability.frameDurationUs) {
+ for (int32_t octetsPerFrame :
+ aptx_adaptive_le_capability.octetsPerFrame) {
+ for (int8_t blocksPerSdu :
+ aptx_adaptive_le_capability.blocksPerSdu) {
+ for (int32_t codecMode : apx_adaptive_le_config_codec_modes) {
+ AptxAdaptiveLeConfiguration aptx_adaptive_le_config = {
+ .samplingFrequencyHz = samplingFrequencyHz,
+ .frameDurationUs = frameDurationUs,
+ .octetsPerFrame = octetsPerFrame,
+ .blocksPerSdu = blocksPerSdu,
+ .codecMode = codecMode,
+ };
+ le_audio_codec_configs.push_back(aptx_adaptive_le_config);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return le_audio_codec_configs;
+ }
+
LeAudioCodecCapabilitiesSetting temp_le_audio_capabilities_;
};
@@ -1268,6 +1346,87 @@
}
}
+static std::vector<uint8_t> vendorMetadata = {0x0B, // Length
+ 0xFF, // Type: Vendor-specific
+ 0x0A, 0x00, // Company_ID
+ 0x01, 0x02, 0x03, 0x04, // Data
+ 0x05, 0x06, 0x07, 0x08};
+
+/**
+ * Test whether each provider of type
+ * SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH can be started and
+ * stopped with Unicast hardware encoding config
+ */
+TEST_P(BluetoothAudioProviderLeAudioOutputHardwareAidl,
+ StartAndEndLeAudioOutputSessionWithAptxAdaptiveLeUnicastConfig) {
+ if (!IsOffloadOutputSupported()) {
+ return;
+ }
+ for (auto codec_type :
+ {CodecType::APTX_ADAPTIVE_LE, CodecType::APTX_ADAPTIVE_LEX}) {
+ bool is_le_extended = (codec_type == CodecType::APTX_ADAPTIVE_LEX);
+ auto aptx_adaptive_le_codec_configs =
+ GetUnicastAptxAdaptiveLeSupportedList(false, true, is_le_extended);
+ LeAudioConfiguration le_audio_config = {
+ .codecType = codec_type,
+ .peerDelayUs = 0,
+ .vendorSpecificMetadata = vendorMetadata,
+ };
+
+ for (auto& aptx_adaptive_le_config : aptx_adaptive_le_codec_configs) {
+ le_audio_config.leAudioCodecConfig
+ .set<LeAudioCodecConfiguration::aptxAdaptiveLeConfig>(
+ aptx_adaptive_le_config);
+ DataMQDesc mq_desc;
+ auto aidl_retval = audio_provider_->startSession(
+ audio_port_, AudioConfiguration(le_audio_config), latency_modes,
+ &mq_desc);
+
+ ASSERT_TRUE(aidl_retval.isOk());
+ EXPECT_TRUE(audio_provider_->endSession().isOk());
+ }
+ }
+}
+
+/**
+ * Test whether each provider of type
+ * SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH can be started and
+ * stopped with Unicast hardware encoding config
+ */
+TEST_P(
+ BluetoothAudioProviderLeAudioOutputHardwareAidl,
+ BluetoothAudioProviderLeAudioOutputHardwareAidl_StartAndEndLeAudioOutputSessionWithInvalidAptxAdaptiveLeAudioConfiguration) {
+ if (!IsOffloadOutputSupported()) {
+ return;
+ }
+
+ for (auto codec_type :
+ {CodecType::APTX_ADAPTIVE_LE, CodecType::APTX_ADAPTIVE_LEX}) {
+ bool is_le_extended = (codec_type == CodecType::APTX_ADAPTIVE_LEX);
+ auto aptx_adaptive_le_codec_configs =
+ GetUnicastAptxAdaptiveLeSupportedList(false, true, is_le_extended);
+ LeAudioConfiguration le_audio_config = {
+ .codecType = codec_type,
+ .peerDelayUs = 0,
+ .vendorSpecificMetadata = vendorMetadata,
+ };
+
+ for (auto& aptx_adaptive_le_config : aptx_adaptive_le_codec_configs) {
+ le_audio_config.leAudioCodecConfig
+ .set<LeAudioCodecConfiguration::aptxAdaptiveLeConfig>(
+ aptx_adaptive_le_config);
+ DataMQDesc mq_desc;
+ auto aidl_retval = audio_provider_->startSession(
+ audio_port_, AudioConfiguration(le_audio_config), latency_modes,
+ &mq_desc);
+
+ // AIDL call should fail on invalid codec
+ ASSERT_FALSE(aidl_retval.isOk());
+ EXPECT_TRUE(audio_provider_->endSession().isOk());
+ }
+ }
+}
+
/**
* openProvider LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH
*/
@@ -1877,7 +2036,7 @@
ASSERT_NE(audio_provider_, nullptr);
std::vector<CodecConfiguration::CodecSpecific> codec_specifics;
- for (auto codec_type : a2dp_codec_types) {
+ for (auto codec_type : ndk::enum_range<CodecType>()) {
switch (codec_type) {
case CodecType::SBC:
codec_specifics = GetSbcCodecSpecificSupportedList(false);
@@ -1898,6 +2057,8 @@
codec_specifics = GetOpusCodecSpecificSupportedList(false);
continue;
case CodecType::APTX_ADAPTIVE:
+ case CodecType::APTX_ADAPTIVE_LE:
+ case CodecType::APTX_ADAPTIVE_LEX:
case CodecType::LC3:
case CodecType::VENDOR:
case CodecType::UNKNOWN:
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
index faebbbf..3ed9e07 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
@@ -20,6 +20,8 @@
#include <aidl/android/hardware/bluetooth/audio/AacCapabilities.h>
#include <aidl/android/hardware/bluetooth/audio/AacObjectType.h>
+#include <aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeCapabilities.h>
+#include <aidl/android/hardware/bluetooth/audio/AptxAdaptiveLeConfiguration.h>
#include <aidl/android/hardware/bluetooth/audio/AptxCapabilities.h>
#include <aidl/android/hardware/bluetooth/audio/ChannelMode.h>
#include <aidl/android/hardware/bluetooth/audio/LdacCapabilities.h>
@@ -98,6 +100,55 @@
std::vector<LeAudioCodecCapabilitiesSetting> kDefaultOffloadLeAudioCapabilities;
+static const UnicastCapability kInvalidUnicastCapability = {
+ .codecType = CodecType::UNKNOWN};
+
+static const AptxAdaptiveLeCapabilities
+ kDefaultOffloadAptxAdaptiveLeCapability_48k = {
+ .samplingFrequencyHz = {48000},
+ .frameDurationUs = {10000},
+ .octetsPerFrame = {816}};
+
+static const AptxAdaptiveLeCapabilities
+ kDefaultOffloadAptxAdaptiveLeCapability_96k = {
+ .samplingFrequencyHz = {96000},
+ .frameDurationUs = {10000},
+ .octetsPerFrame = {816}};
+
+static const AptxAdaptiveLeCapabilities
+ kDefaultOffloadAptxAdaptiveLeXCapability_48k = {
+ .samplingFrequencyHz = {48000},
+ .frameDurationUs = {10000},
+ .octetsPerFrame = {816}};
+
+static const AptxAdaptiveLeCapabilities
+ kDefaultOffloadAptxAdaptiveLeXCapability_96k = {
+ .samplingFrequencyHz = {96000},
+ .frameDurationUs = {10000},
+ .octetsPerFrame = {816}};
+
+static const BroadcastCapability kInvalidBroadcastCapability = {
+ .codecType = CodecType::UNKNOWN};
+
+static AudioLocation stereoAudio = static_cast<AudioLocation>(
+ static_cast<uint8_t>(AudioLocation::FRONT_LEFT) |
+ static_cast<uint8_t>(AudioLocation::FRONT_RIGHT));
+
+static const std::vector<AptxAdaptiveLeCapabilities>
+ supportedAptxAdaptiveLeCapabilityList = {
+ kDefaultOffloadAptxAdaptiveLeCapability_48k,
+ kDefaultOffloadAptxAdaptiveLeCapability_96k,
+ kDefaultOffloadAptxAdaptiveLeXCapability_48k,
+ kDefaultOffloadAptxAdaptiveLeXCapability_96k};
+
+// Stores the supported setting of audio location, connected device, and the
+// channel count for each device
+std::vector<std::tuple<AudioLocation, uint8_t, uint8_t>>
+ supportedDeviceSetting = {
+ // Stereo, one connected device for both L and R
+ std::make_tuple(stereoAudio, 1, 2),
+};
+
template <class T>
bool BluetoothAudioCodecs::ContainedInVector(
const std::vector<T>& vector, const typename identity<T>::type& target) {
@@ -312,6 +363,8 @@
case CodecType::VENDOR:
case CodecType::LC3:
case CodecType::APTX_ADAPTIVE:
+ case CodecType::APTX_ADAPTIVE_LE:
+ case CodecType::APTX_ADAPTIVE_LEX:
break;
}
}
@@ -377,6 +430,8 @@
}
break;
case CodecType::APTX_ADAPTIVE:
+ case CodecType::APTX_ADAPTIVE_LE:
+ case CodecType::APTX_ADAPTIVE_LEX:
case CodecType::LC3:
case CodecType::UNKNOWN:
case CodecType::VENDOR:
@@ -403,8 +458,33 @@
kDefaultOffloadLeAudioCapabilities =
BluetoothLeAudioCodecsProvider::GetLeAudioCodecCapabilities(
le_audio_offload_setting);
- }
+ for (auto [audioLocation, deviceCnt, channelCount] :
+ supportedDeviceSetting) {
+ for (auto capability : supportedAptxAdaptiveLeCapabilityList) {
+ for (auto codec_type :
+ {CodecType::APTX_ADAPTIVE_LE, CodecType::APTX_ADAPTIVE_LEX}) {
+ if (session_type ==
+ SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH) {
+ UnicastCapability aptx_adaptive_le_cap = {
+ .codecType = codec_type,
+ .supportedChannel = audioLocation,
+ .deviceCount = deviceCnt,
+ .channelCountPerDevice = channelCount,
+ .leAudioCodecCapabilities =
+ UnicastCapability::LeAudioCodecCapabilities(capability),
+ };
+
+ // Adds the capability for encode only
+ kDefaultOffloadLeAudioCapabilities.push_back(
+ {.unicastEncodeCapability = aptx_adaptive_le_cap,
+ .unicastDecodeCapability = kInvalidUnicastCapability,
+ .broadcastCapability = kInvalidBroadcastCapability});
+ }
+ }
+ }
+ }
+ }
return kDefaultOffloadLeAudioCapabilities;
}
diff --git a/camera/device/3.2/types.hal b/camera/device/3.2/types.hal
index 276e92a..3989161 100644
--- a/camera/device/3.2/types.hal
+++ b/camera/device/3.2/types.hal
@@ -346,15 +346,18 @@
* An override pixel format for the buffers in this stream.
*
* The HAL must respect the requested format in Stream unless it is
- * IMPLEMENTATION_DEFINED, in which case the override format here must be
- * used by the client instead, for this stream. This allows cross-platform
- * HALs to use a standard format since IMPLEMENTATION_DEFINED formats often
- * require device-specific information. In all other cases, the
+ * IMPLEMENTATION_DEFINED output, in which case the override format
+ * here must be used by the client instead, for this stream. This allows
+ * cross-platform HALs to use a standard format since IMPLEMENTATION_DEFINED
+ * formats often require device-specific information. In all other cases, the
* overrideFormat must match the requested format.
*
* When HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, then the platform
* gralloc module must select a format based on the usage flags provided by
* the camera device and the other endpoint of the stream.
+ *
+ * For private reprocessing, the HAL must not override the input stream's
+ * IMPLEMENTATION_DEFINED format.
*/
android.hardware.graphics.common@1.0::PixelFormat overrideFormat;
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/HalStream.aidl b/camera/device/aidl/android/hardware/camera/device/HalStream.aidl
index b8ec3de..25a80bc 100644
--- a/camera/device/aidl/android/hardware/camera/device/HalStream.aidl
+++ b/camera/device/aidl/android/hardware/camera/device/HalStream.aidl
@@ -38,7 +38,7 @@
* An override pixel format for the buffers in this stream.
*
* The HAL must respect the requested format in Stream unless it is
- * IMPLEMENTATION_DEFINED, in which case the override format here must be
+ * IMPLEMENTATION_DEFINED output, in which case the override format here must be
* used by the client instead, for this stream. This allows cross-platform
* HALs to use a standard format since IMPLEMENTATION_DEFINED formats often
* require device-specific information. In all other cases, the
@@ -47,6 +47,9 @@
* When HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, then the platform
* gralloc module must select a format based on the usage flags provided by
* the camera device and the other endpoint of the stream.
+ *
+ * For private reprocessing, the HAL must not override the input stream's
+ * IMPLEMENTATION_DEFINED format.
*/
android.hardware.graphics.common.PixelFormat overrideFormat;
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/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp
index d28ee0f..64507fe 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.cpp
+++ b/camera/provider/aidl/vts/camera_aidl_test.cpp
@@ -2524,6 +2524,7 @@
request.fmqSettingsSize = 0;
request.settings.metadata =
std::vector(rawMetadata, rawMetadata + get_camera_metadata_size(releasedMetadata));
+ overrideRotateAndCrop(&request.settings);
request.outputBuffers = std::vector<StreamBuffer>(1);
StreamBuffer& outputBuffer = request.outputBuffers[0];
if (useHalBufManager) {
diff --git a/cas/aidl/android/hardware/cas/DestinationBuffer.aidl b/cas/aidl/android/hardware/cas/DestinationBuffer.aidl
index 74336c2..ac562dc 100644
--- a/cas/aidl/android/hardware/cas/DestinationBuffer.aidl
+++ b/cas/aidl/android/hardware/cas/DestinationBuffer.aidl
@@ -25,13 +25,13 @@
@VintfStability
union DestinationBuffer {
/**
- * If type == SHARED_MEMORY, the descrambled data must be written
+ * If the buffer is SharedBuffer, the descrambled data must be written
* to user-space non-secure shared memory.
*/
SharedBuffer nonsecureMemory;
/**
- * If type == NATIVE_HANDLE, the descrambled data must be written
+ * If the buffer is presented by NativeHandle, the descrambled data must be written
* to secure memory referenced by the vendor's buffer allocator.
*/
NativeHandle secureMemory;
diff --git a/compatibility_matrices/Android.bp b/compatibility_matrices/Android.bp
index e1ad1f3..622835e 100644
--- a/compatibility_matrices/Android.bp
+++ b/compatibility_matrices/Android.bp
@@ -78,7 +78,7 @@
"compatibility_matrix.8.xml",
],
kernel_configs: [
- "kernel_config_current_5.10",
"kernel_config_current_5.15",
+ "kernel_config_current_6.1",
],
}
diff --git a/compatibility_matrices/compatibility_matrix.7.xml b/compatibility_matrices/compatibility_matrix.7.xml
index 5694945..67dd717 100644
--- a/compatibility_matrices/compatibility_matrix.7.xml
+++ b/compatibility_matrices/compatibility_matrix.7.xml
@@ -400,14 +400,6 @@
</interface>
</hal>
<hal format="aidl" optional="true">
- <name>android.hardware.security.dice</name>
- <version>1</version>
- <interface>
- <name>IDiceDevice</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="aidl" optional="true">
<name>android.hardware.security.keymint</name>
<version>1-2</version>
<interface>
diff --git a/compatibility_matrices/compatibility_matrix.8.xml b/compatibility_matrices/compatibility_matrix.8.xml
index 1b0b496..c58f559 100644
--- a/compatibility_matrices/compatibility_matrix.8.xml
+++ b/compatibility_matrices/compatibility_matrix.8.xml
@@ -338,14 +338,6 @@
</interface>
</hal>
<hal format="aidl" optional="true">
- <name>android.hardware.security.dice</name>
- <version>1</version>
- <interface>
- <name>IDiceDevice</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="aidl" optional="true">
<name>android.hardware.security.keymint</name>
<version>1-3</version>
<interface>
@@ -508,16 +500,6 @@
</interface>
</hal>
<hal format="aidl" optional="true">
- <name>android.hardware.radio.satellite</name>
- <version>1</version>
- <interface>
- <name>IRadioSatellite</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- <instance>slot3</instance>
- </interface>
- </hal>
- <hal format="aidl" optional="true">
<name>android.hardware.radio.ims.media</name>
<version>1</version>
<interface>
diff --git a/confirmationui/1.0/default/OWNERS b/confirmationui/1.0/default/OWNERS
index 335660d..17aed51 100644
--- a/confirmationui/1.0/default/OWNERS
+++ b/confirmationui/1.0/default/OWNERS
@@ -1,2 +1,3 @@
+# Bug component: 1124672
jdanis@google.com
swillden@google.com
diff --git a/confirmationui/1.0/vts/OWNERS b/confirmationui/1.0/vts/OWNERS
index e7aa8b4..aa07242 100644
--- a/confirmationui/1.0/vts/OWNERS
+++ b/confirmationui/1.0/vts/OWNERS
@@ -1,3 +1,4 @@
+# Bug component: 1124672
jdanis@google.com
swillden@google.com
yim@google.com
diff --git a/confirmationui/OWNERS b/confirmationui/OWNERS
index 2bcdb0e..d3896df 100644
--- a/confirmationui/OWNERS
+++ b/confirmationui/OWNERS
@@ -1,2 +1,3 @@
+# Bug component: 1124672
swillden@google.com
subrahmanyaman@google.com
diff --git a/confirmationui/aidl/vts/functional/Android.bp b/confirmationui/aidl/vts/functional/Android.bp
index 3649c87..ac2d53a 100644
--- a/confirmationui/aidl/vts/functional/Android.bp
+++ b/confirmationui/aidl/vts/functional/Android.bp
@@ -23,7 +23,7 @@
name: "VtsHalConfirmationUITargetTest",
defaults: [
"VtsHalTargetTestDefaults",
- "keymint_use_latest_hal_aidl_ndk_shared",
+ "keymint_use_latest_hal_aidl_ndk_static",
"use_libaidlvintf_gtest_helper_static",
],
srcs: [
@@ -31,8 +31,9 @@
],
static_libs: [
"android.hardware.confirmationui-V1-ndk",
- "libcn-cbor",
"android.hardware.confirmationui-support-lib",
+ "android.hardware.security.secureclock-V1-ndk",
+ "libcn-cbor",
],
shared_libs: [
"libbinder_ndk",
diff --git a/confirmationui/support/OWNERS b/confirmationui/support/OWNERS
index 335660d..17aed51 100644
--- a/confirmationui/support/OWNERS
+++ b/confirmationui/support/OWNERS
@@ -1,2 +1,3 @@
+# Bug component: 1124672
jdanis@google.com
swillden@google.com
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
index d66e1ac..de8d752 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
@@ -45,8 +45,8 @@
void sendMessageToHub(in int contextHubId, in android.hardware.contexthub.ContextHubMessage message);
void onHostEndpointConnected(in android.hardware.contexthub.HostEndpointInfo hostEndpointInfo);
void onHostEndpointDisconnected(char hostEndpointId);
- long[] getPreloadedNanoappIds();
- void onNanSessionStateChanged(in boolean state);
+ long[] getPreloadedNanoappIds(in int contextHubId);
+ void onNanSessionStateChanged(in android.hardware.contexthub.NanSessionStateUpdate update);
void setTestMode(in boolean enable);
- const int EX_CONTEXT_HUB_UNSPECIFIED = (-1);
+ const int EX_CONTEXT_HUB_UNSPECIFIED = (-1) /* -1 */;
}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl
index e72ae73..6163cfc 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl
@@ -38,6 +38,6 @@
void handleContextHubMessage(in android.hardware.contexthub.ContextHubMessage msg, in String[] msgContentPerms);
void handleContextHubAsyncEvent(in android.hardware.contexthub.AsyncEventType evt);
void handleTransactionResult(in int transactionId, in boolean success);
- void handleNanSessionRequest(in boolean enable);
+ void handleNanSessionRequest(in android.hardware.contexthub.NanSessionRequest request);
const int CONTEXTHUB_NAN_TRANSACTION_TIMEOUT_MS = 10000;
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanSessionRequest.aidl
similarity index 90%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanSessionRequest.aidl
index 758b251..d539707 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanSessionRequest.aidl
@@ -31,10 +31,8 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.automotive.vehicle;
-@Backing(type="int") @VintfStability
-enum DriverAttentionMonitoringWarning {
- OTHER = 0,
- NO_WARNING = 1,
- WARNING = 2,
+package android.hardware.contexthub;
+@VintfStability
+parcelable NanSessionRequest {
+ boolean enable;
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanSessionStateUpdate.aidl
similarity index 90%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanSessionStateUpdate.aidl
index 758b251..80771e2 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanSessionStateUpdate.aidl
@@ -31,10 +31,8 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.automotive.vehicle;
-@Backing(type="int") @VintfStability
-enum DriverAttentionMonitoringWarning {
- OTHER = 0,
- NO_WARNING = 1,
- WARNING = 2,
+package android.hardware.contexthub;
+@VintfStability
+parcelable NanSessionStateUpdate {
+ boolean state;
}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanoappBinary.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanoappBinary.aidl
index 741a9cf..fdf3860 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanoappBinary.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanoappBinary.aidl
@@ -40,7 +40,7 @@
byte targetChreApiMajorVersion;
byte targetChreApiMinorVersion;
byte[] customBinary;
- const int FLAG_SIGNED = (1 << 0);
- const int FLAG_ENCRYPTED = (1 << 1);
- const int FLAG_TCM_CAPABLE = (1 << 2);
+ const int FLAG_SIGNED = (1 << 0) /* 1 */;
+ const int FLAG_ENCRYPTED = (1 << 1) /* 2 */;
+ const int FLAG_TCM_CAPABLE = (1 << 2) /* 4 */;
}
diff --git a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
index f9838bd..9683d2d 100644
--- a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
@@ -20,6 +20,7 @@
import android.hardware.contexthub.ContextHubMessage;
import android.hardware.contexthub.HostEndpointInfo;
import android.hardware.contexthub.IContextHubCallback;
+import android.hardware.contexthub.NanSessionStateUpdate;
import android.hardware.contexthub.NanoappBinary;
import android.hardware.contexthub.NanoappInfo;
import android.hardware.contexthub.Setting;
@@ -199,9 +200,11 @@
* Provides the list of preloaded nanoapp IDs on the system. The output of this API must
* not change.
*
- * @return The list of preloaded nanoapp IDs
+ * @param contextHubId The identifier of the Context Hub.
+ *
+ * @return The list of preloaded nanoapp IDs.
*/
- long[] getPreloadedNanoappIds();
+ long[] getPreloadedNanoappIds(in int contextHubId);
/**
* Invoked when the state of the NAN session requested through handleNanSessionRequest()
@@ -212,9 +215,9 @@
* explicitly invoke handleNanSessionRequest() at a later point in time to attempt to
* re-enable NAN.
*
- * @param state True if the NAN session is currently enabled.
+ * @param update Information about the latest NAN session state.
*/
- void onNanSessionStateChanged(in boolean state);
+ void onNanSessionStateChanged(in NanSessionStateUpdate update);
/**
* Puts the context hub in and out of test mode. Test mode is a clean state
diff --git a/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl b/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl
index cff1893..bfcb51e 100644
--- a/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl
@@ -18,6 +18,7 @@
import android.hardware.contexthub.AsyncEventType;
import android.hardware.contexthub.ContextHubMessage;
+import android.hardware.contexthub.NanSessionRequest;
import android.hardware.contexthub.NanoappInfo;
@VintfStability
@@ -85,10 +86,9 @@
* request times out, onNanSessionStateChanged() will be invoked with the state that the session
* was previously in.
*
- * @param enable Whether the NAN session should be enabled or disabled depending on whether the
- * Contexthub needs access to NAN.
+ * @param request Request from the HAL indicating the latest NAN session state it would like.
*/
- void handleNanSessionRequest(in boolean enable);
+ void handleNanSessionRequest(in NanSessionRequest request);
/**
* Amount of time, in milliseconds, that a handleNanSessionRequest can be pending before the
diff --git a/radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl b/contexthub/aidl/android/hardware/contexthub/NanSessionRequest.aidl
similarity index 60%
copy from radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl
copy to contexthub/aidl/android/hardware/contexthub/NanSessionRequest.aidl
index 1a65bee..c462ba1 100644
--- a/radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/NanSessionRequest.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,16 @@
* limitations under the License.
*/
-package android.hardware.radio.satellite;
+package android.hardware.contexthub;
+/**
+ * Contains information needed to request a state change for a NAN session.
+ */
@VintfStability
-@Backing(type="int")
-@JavaDerive(toString=true)
-enum IndicationFilter {
- NONE = 0,
- SATELLITE_MODE = 1
+parcelable NanSessionRequest {
+ /**
+ * Whether the NAN session should be enabled or disabled depending on whether the Contexthub
+ * needs access to NAN.
+ */
+ boolean enable;
}
diff --git a/radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl b/contexthub/aidl/android/hardware/contexthub/NanSessionStateUpdate.aidl
similarity index 66%
rename from radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl
rename to contexthub/aidl/android/hardware/contexthub/NanSessionStateUpdate.aidl
index 1a65bee..a58eda5 100644
--- a/radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/NanSessionStateUpdate.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,15 @@
* limitations under the License.
*/
-package android.hardware.radio.satellite;
+package android.hardware.contexthub;
+/**
+ * Contains information provided as a response to a NanSessionRequest.
+ */
@VintfStability
-@Backing(type="int")
-@JavaDerive(toString=true)
-enum IndicationFilter {
- NONE = 0,
- SATELLITE_MODE = 1
+parcelable NanSessionStateUpdate {
+ /**
+ * True if the NAN session is currently enabled.
+ */
+ boolean state;
}
diff --git a/contexthub/aidl/default/ContextHub.cpp b/contexthub/aidl/default/ContextHub.cpp
index b98bfb2..5272957 100644
--- a/contexthub/aidl/default/ContextHub.cpp
+++ b/contexthub/aidl/default/ContextHub.cpp
@@ -76,7 +76,8 @@
}
}
-ScopedAStatus ContextHub::getPreloadedNanoappIds(std::vector<int64_t>* out_preloadedNanoappIds) {
+ScopedAStatus ContextHub::getPreloadedNanoappIds(int32_t /* in_contextHubId */,
+ std::vector<int64_t>* out_preloadedNanoappIds) {
if (out_preloadedNanoappIds == nullptr) {
return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
@@ -87,7 +88,7 @@
return ndk::ScopedAStatus::ok();
}
-ScopedAStatus ContextHub::onNanSessionStateChanged(bool /*sin_state*/) {
+ScopedAStatus ContextHub::onNanSessionStateChanged(const NanSessionStateUpdate& /*in_update*/) {
return ndk::ScopedAStatus::ok();
}
diff --git a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
index dc9aef0..7a2cfd1 100644
--- a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
+++ b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
@@ -39,7 +39,7 @@
::ndk::ScopedAStatus onSettingChanged(Setting in_setting, bool in_enabled) override;
::ndk::ScopedAStatus queryNanoapps(int32_t in_contextHubId) override;
::ndk::ScopedAStatus getPreloadedNanoappIds(
- std::vector<int64_t>* out_preloadedNanoappIds) override;
+ int32_t in_contextHubId, std::vector<int64_t>* out_preloadedNanoappIds) override;
::ndk::ScopedAStatus registerCallback(
int32_t in_contextHubId, const std::shared_ptr<IContextHubCallback>& in_cb) override;
::ndk::ScopedAStatus sendMessageToHub(int32_t in_contextHubId,
@@ -48,7 +48,7 @@
::ndk::ScopedAStatus onHostEndpointConnected(const HostEndpointInfo& in_info) override;
::ndk::ScopedAStatus onHostEndpointDisconnected(char16_t in_hostEndpointId) override;
- ::ndk::ScopedAStatus onNanSessionStateChanged(bool in_state) override;
+ ::ndk::ScopedAStatus onNanSessionStateChanged(const NanSessionStateUpdate& in_update) override;
private:
static constexpr uint32_t kMockHubId = 0;
diff --git a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
index b227e4a..f544d83 100644
--- a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
+++ b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
@@ -42,6 +42,8 @@
using ::android::hardware::contexthub::NanoappBinary;
using ::android::hardware::contexthub::NanoappInfo;
using ::android::hardware::contexthub::NanoappRpcService;
+using ::android::hardware::contexthub::NanSessionRequest;
+using ::android::hardware::contexthub::NanSessionStateUpdate;
using ::android::hardware::contexthub::Setting;
using ::android::hardware::contexthub::vts_utils::kNonExistentAppId;
using ::android::hardware::contexthub::vts_utils::waitForCallback;
@@ -121,7 +123,9 @@
return Status::ok();
}
- Status handleNanSessionRequest(bool /* enable */) override { return Status::ok(); }
+ Status handleNanSessionRequest(const NanSessionRequest& /* request */) override {
+ return Status::ok();
+ }
};
TEST_P(ContextHubAidl, TestRegisterCallback) {
@@ -153,7 +157,9 @@
return Status::ok();
}
- Status handleNanSessionRequest(bool /* enable */) override { return Status::ok(); }
+ Status handleNanSessionRequest(const NanSessionRequest& /* request */) override {
+ return Status::ok();
+ }
std::promise<std::vector<NanoappInfo>> promise;
};
@@ -180,10 +186,10 @@
}
}
-// Calls getPreloadedNanoapps() and verifies there are preloaded nanoapps
-TEST_P(ContextHubAidl, TestGetPreloadedNanoapps) {
+// Calls getPreloadedNanoappsIds() and verifies there are preloaded nanoapps
+TEST_P(ContextHubAidl, TestGetPreloadedNanoappIds) {
std::vector<int64_t> preloadedNanoappIds;
- Status status = contextHub->getPreloadedNanoappIds(&preloadedNanoappIds);
+ Status status = contextHub->getPreloadedNanoappIds(getHubId(), &preloadedNanoappIds);
if (status.exceptionCode() == Status::EX_UNSUPPORTED_OPERATION ||
status.transactionError() == android::UNKNOWN_TRANSACTION) {
GTEST_SKIP() << "Not supported -> old API; or not implemented";
@@ -218,7 +224,9 @@
return Status::ok();
}
- Status handleNanSessionRequest(bool /* enable */) override { return Status::ok(); }
+ Status handleNanSessionRequest(const NanSessionRequest& /* request */) override {
+ return Status::ok();
+ }
uint32_t expectedTransactionId = 0;
std::promise<bool> promise;
@@ -382,8 +390,11 @@
}
TEST_P(ContextHubAidl, TestNanSessionStateChange) {
- ASSERT_TRUE(contextHub->onNanSessionStateChanged(true /*state*/).isOk());
- ASSERT_TRUE(contextHub->onNanSessionStateChanged(false /*state*/).isOk());
+ NanSessionStateUpdate update;
+ update.state = true;
+ ASSERT_TRUE(contextHub->onNanSessionStateChanged(update).isOk());
+ update.state = false;
+ ASSERT_TRUE(contextHub->onNanSessionStateChanged(update).isOk());
}
std::string PrintGeneratedTest(const testing::TestParamInfo<ContextHubAidl::ParamType>& info) {
diff --git a/current.txt b/current.txt
index ef1f65a..a6c4d80 100644
--- a/current.txt
+++ b/current.txt
@@ -934,5 +934,8 @@
42abd285a4293dadb8c89bc63b90cae2872fbffe90c4517aa3ea4965e8aecff7 android.hardware.graphics.common@1.2::types
4f1a02d21a22104c734f71cdbba19b6f7e93d4ee107ff79f0dbdd171a8430e0e android.hardware.automotive.vehicle@2.0::types
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
# There will be no more HIDL HALs. Use AIDL instead.
diff --git a/gatekeeper/1.0/default/OWNERS b/gatekeeper/1.0/default/OWNERS
index 335660d..c97fba6 100644
--- a/gatekeeper/1.0/default/OWNERS
+++ b/gatekeeper/1.0/default/OWNERS
@@ -1,2 +1,3 @@
+# Bug component: 1124862
jdanis@google.com
swillden@google.com
diff --git a/gatekeeper/1.0/software/OWNERS b/gatekeeper/1.0/software/OWNERS
index 335660d..c97fba6 100644
--- a/gatekeeper/1.0/software/OWNERS
+++ b/gatekeeper/1.0/software/OWNERS
@@ -1,2 +1,3 @@
+# Bug component: 1124862
jdanis@google.com
swillden@google.com
diff --git a/gatekeeper/OWNERS b/gatekeeper/OWNERS
index fddc2ff..5262dce 100644
--- a/gatekeeper/OWNERS
+++ b/gatekeeper/OWNERS
@@ -1,4 +1,6 @@
# Bug component: 1124862
-swillden@google.com
+drysdale@google.com
guangzhu@google.com
+oarbildo@google.com
subrahmanyaman@google.com
+swillden@google.com
diff --git a/gatekeeper/aidl/vts/functional/Android.bp b/gatekeeper/aidl/vts/functional/Android.bp
index 2fa80de..008f25c 100644
--- a/gatekeeper/aidl/vts/functional/Android.bp
+++ b/gatekeeper/aidl/vts/functional/Android.bp
@@ -24,14 +24,17 @@
defaults: [
"VtsHalTargetTestDefaults",
"use_libaidlvintf_gtest_helper_static",
- "keymint_use_latest_hal_aidl_ndk_shared",
+ "keymint_use_latest_hal_aidl_ndk_static",
],
srcs: ["VtsHalGatekeeperTargetTest.cpp"],
shared_libs: [
"libbinder_ndk",
"libbase",
],
- static_libs: ["android.hardware.gatekeeper-V1-ndk"],
+ static_libs: [
+ "android.hardware.gatekeeper-V1-ndk",
+ "android.hardware.security.secureclock-V1-ndk",
+ ],
test_suites: [
"general-tests",
"vts",
diff --git a/gnss/aidl/android/hardware/gnss/GnssMeasurement.aidl b/gnss/aidl/android/hardware/gnss/GnssMeasurement.aidl
index db724a4..925df1a 100644
--- a/gnss/aidl/android/hardware/gnss/GnssMeasurement.aidl
+++ b/gnss/aidl/android/hardware/gnss/GnssMeasurement.aidl
@@ -133,50 +133,50 @@
* zero to the value in the table. The state flag with the widest range indicates the range of
* the received GNSS satellite time value.
*
- * +---------------------------+--------------------+-----+-----------+--------------------+------+
- * | |GPS/QZSS |GLNS |BDS |GAL |SBAS |
- * +---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |State Flag |L1 |L5I |L5Q |L1OF |B1I |B1I |E1B |E1C |E5AQ |L1 |
- * | |C/A | | | |(D1) |(D2)| | | |C/A |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_UNKNOWN |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_CODE_LOCK |1ms |1 ms |1 ms |1 ms |1 ms |1 ms|- |- |1 ms |1 ms |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_SYMBOL_SYNC |20ms |10 ms |1 ms |10 ms|20 ms |2 ms|4 ms |4 ms |1 ms |2 ms |
- * | |(opt.)| |(opt.)| |(opt.)| |(opt.)|(opt.)|(opt.)| |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_BIT_SYNC |20 ms |20 ms |1 ms |20 ms|20 ms |- |8 ms |- |1 ms |4 ms |
- * | | | |(opt.)| | | | | |(opt.)| |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_SUBFRAME_SYNC |6s |6s |- |2 s |6 s |- |- |- |100 ms|- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_TOW_DECODED |1 week|- |- |1 day|1 week|- |1 week|- |- |1 week|
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_TOW_KNOWN |1 week|- |- |1 day|1 week|- |1 week|- |- |1 week|
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_GLO_STRING_SYNC |- |- |- |2 s |- |- |- |- |- |- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_GLO_TOD_DECODED |- |- |- |1 day|- |- |- |- |- |- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_GLO_TOD_KNOWN |- |- |- |1 day|- |- |- |- |- |- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_BDS_D2_BIT_SYNC |- |- |- |- |- |2 ms|- |- |- |- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_BDS_D2_SUBFRAME_SYNC |- |- |- |- |- |600 |- |- |- |- |
- * | | | | | | |ms | | | | |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_GAL_E1BC_CODE_LOCK |- |- |- |- |- |- |4 ms |4 ms |- |- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_GAL_E1C_2ND_CODE_LOCK|- |- |- |- |- |- |- |100 ms|- |- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_2ND_CODE_LOCK |- |10 ms |20 ms |- |- |- |- |100 ms|100 ms|- |
- * | | |(opt.)| | | | | |(opt.)| | |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_GAL_E1B_PAGE_SYNC |- |- |- |- |- |- |2 s |- |- |- |
- * |---------------------------+------+------+------+-----+------+----+------+------+------+------+
- * |STATE_SBAS_SYNC |- |- |- |- |- |- |- |- |- |1s |
- * +---------------------------+------+------+------+-----+------+----+------+------+------+------+
+ * +---------------------------+---------------------------+-----+---------------------------+--------------------+------+------+
+ * | |GPS/QZSS |GLNS |BDS |GAL |SBAS |IRNSS |
+ * +---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |State Flag |L1 |L1C |L5I |L5Q |L1OF |B1I |B1I |B1C |B2AQ |E1B |E1C |E5AQ |L1 |L5C |
+ * | |C/A |(P) | | | |(D1) |(D2) |(P) | | | | |C/A | |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_UNKNOWN |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_CODE_LOCK |1ms |10 ms |1 ms |1 ms |1 ms |1 ms |1 ms |10 ms |1 ms |- |- |1 ms |1 ms |1ms |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_SYMBOL_SYNC |- |- |10 ms |- |10 ms|- |2 ms |- |- |- |- |- |2 ms |- |
+ * | | | | | | | | | | | | | | | |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_BIT_SYNC |20 ms |- |20 ms |- |20 ms|20 ms |- |- |- |8 ms |- |- |4 ms |20 ms |
+ * | | | | | | | | | | | | | | | |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_SUBFRAME_SYNC |6s |- |6s |- |- |6 s |- |- |100 ms|- |- |100 ms|- |6s |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_TOW_DECODED |1 week|- |1 week|- |- |1 week|1 week|- |- |1 week|1 week|- |1 week|1 week|
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_TOW_KNOWN |1 week|1 week|1 week|1 week|- |1 week|1 week|1 week|1 week|1 week|1 week|1 week|1 week|1 week|
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_GLO_STRING_SYNC |- |- |- |- |2 s |- |- |- |- |- |- |- |- |- |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_GLO_TOD_DECODED |- |- |- |- |1 day|- |- |- |- |- |- |- |- |- |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_GLO_TOD_KNOWN |- |- |- |- |1 day|- |- |- |- |- |- |- |- |- |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_BDS_D2_BIT_SYNC |- |- |- |- |- |- |2 ms |- |- |- |- |- |- |- |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_BDS_D2_SUBFRAME_SYNC |- |- |- |- |- |- |600 |- |- |- |- |- |- |- |
+ * | | | | | | | |ms | | | | | | | |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_GAL_E1BC_CODE_LOCK |- |- |- |- |- |- |- |- |- |4 ms |4 ms |- |- |- |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_GAL_E1C_2ND_CODE_LOCK|- |- |- |- |- |- |- |- |- |- |100 ms|- |- |- |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_2ND_CODE_LOCK |- |18000 |10 ms |20 ms |- |- |- |18000 |100 ms|- |- |100 ms|- |- |
+ * | | |ms | | | | | |ms | | | | | | |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_GAL_E1B_PAGE_SYNC |- |- |- |- |- |- |- |- |- |2 s |- |- |- |- |
+ * |---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
+ * |STATE_SBAS_SYNC |- |- |- |- |- |- |- |- |- |- |- |- |1s |- |
+ * +---------------------------+------+------+------+------+-----+------+------+------+------+------+------+------+------+------+
*
* Note: TOW Known refers to the case where TOW is possibly not decoded over the air but has
* been determined from other sources. If TOW decoded is set then TOW Known must also be set.
diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp
index 0fbd5e3..96dece4 100644
--- a/gnss/aidl/vts/gnss_hal_test_cases.cpp
+++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp
@@ -1405,8 +1405,8 @@
/*
* TestGnssMeasurementIntervals_WithoutLocation:
- * 1. start measurement with interval
- * 2. verify that the received measurement intervals have expected mean and stdev
+ * 1. Start measurement at intervals
+ * 2. Verify measurement are received at expected intervals
*/
TEST_P(GnssHalTest, TestGnssMeasurementIntervals_WithoutLocation) {
if (aidl_gnss_hal_->getInterfaceVersion() <= 1) {
@@ -1438,8 +1438,9 @@
/*
* TestGnssMeasurementIntervals_LocationOnBeforeMeasurement:
- * 1. start measurement with interval
- * 2. verify that the received measurement intervals have expected mean and stdev
+ * 1. Start location at 1s.
+ * 2. Start measurement at 2s. Verify measurements are received at 1s.
+ * 3. Stop measurement. Stop location.
*/
TEST_P(GnssHalTest, TestGnssMeasurementIntervals_LocationOnBeforeMeasurement) {
if (aidl_gnss_hal_->getInterfaceVersion() <= 1) {
@@ -1474,15 +1475,17 @@
}
/*
- * TestGnssMeasurementIntervals:
- * 1. start measurement with interval
- * 2. verify that the received measurement intervals have expected mean and stddev
+ * TestGnssMeasurementIntervals_LocationOnAfterMeasurement:
+ * 1. Start measurement at 2s
+ * 2. Start location at 1s. Verify measurements are received at 1s
+ * 3. Stop location. Verify measurements are received at 2s
+ * 4. Stop measurement
*/
TEST_P(GnssHalTest, TestGnssMeasurementIntervals_LocationOnAfterMeasurement) {
if (aidl_gnss_hal_->getInterfaceVersion() <= 1) {
return;
}
-
+ const int kFirstMeasTimeoutSec = 10;
std::vector<int> intervals({2000});
sp<IGnssMeasurementInterface> iGnssMeasurement;
@@ -1497,26 +1500,34 @@
auto callback = sp<GnssMeasurementCallbackAidl>::make();
startMeasurementWithInterval(intervalMs, iGnssMeasurement, callback);
+ // Start location and verify the measurements are received at 1Hz
StartAndCheckFirstLocation(locationIntervalMs, /* lowPowerMode= */ false);
std::vector<int> deltas;
- collectMeasurementIntervals(callback, /*numEvents=*/10, /*timeoutSeconds=*/10, deltas);
+ collectMeasurementIntervals(callback, /*numEvents=*/10, kFirstMeasTimeoutSec, deltas);
+ assertMeanAndStdev(locationIntervalMs, deltas);
+ // Stop location request and verify the measurements are received at 2s intervals
StopAndClearLocations();
+ callback->gnss_data_cbq_.reset();
+ deltas.clear();
+ collectMeasurementIntervals(callback, /*numEvents=*/5, kFirstMeasTimeoutSec, deltas);
+ assertMeanAndStdev(intervalMs, deltas);
+
status = iGnssMeasurement->close();
ASSERT_TRUE(status.isOk());
-
- assertMeanAndStdev(locationIntervalMs, deltas);
}
}
/*
- * TestGnssMeasurementSetCallback:
+ * TestGnssMeasurementIntervals_changeIntervals:
* This test ensures setCallback() can be called consecutively without close().
* 1. Start measurement with 20s interval and wait for 1 measurement.
* 2. Start measurement with 1s interval and wait for 5 measurements.
* Verify the measurements were received at 1Hz.
+ * 3. Start measurement with 2s interval and wait for 5 measurements.
+ * Verify the measurements were received at 2s intervals.
*/
-TEST_P(GnssHalTest, TestGnssMeasurementSetCallback) {
+TEST_P(GnssHalTest, TestGnssMeasurementIntervals_changeIntervals) {
if (aidl_gnss_hal_->getInterfaceVersion() <= 2) {
return;
}
@@ -1526,7 +1537,6 @@
ASSERT_TRUE(status.isOk());
ASSERT_TRUE(iGnssMeasurement != nullptr);
- ALOGD("TestGnssMeasurementSetCallback");
auto callback = sp<GnssMeasurementCallbackAidl>::make();
std::vector<int> deltas;
@@ -1537,6 +1547,7 @@
// setCallback at 1s interval and wait for 5 measurements
callback->gnss_data_cbq_.reset();
+ deltas.clear();
startMeasurementWithInterval(1000, iGnssMeasurement, callback);
collectMeasurementIntervals(callback, /* numEvents= */ 5, kFirstGnssMeasurementTimeoutSeconds,
deltas);
@@ -1544,6 +1555,16 @@
// verify the measurements were received at 1Hz
assertMeanAndStdev(1000, deltas);
+ // setCallback at 2s interval and wait for 5 measurements
+ callback->gnss_data_cbq_.reset();
+ deltas.clear();
+ startMeasurementWithInterval(2000, iGnssMeasurement, callback);
+ collectMeasurementIntervals(callback, /* numEvents= */ 5, kFirstGnssMeasurementTimeoutSeconds,
+ deltas);
+
+ // verify the measurements were received at 2s intervals
+ assertMeanAndStdev(2000, deltas);
+
status = iGnssMeasurement->close();
ASSERT_TRUE(status.isOk());
}
diff --git a/gnss/common/utils/default/DeviceFileReader.cpp b/gnss/common/utils/default/DeviceFileReader.cpp
index dfc086a..91e75eb 100644
--- a/gnss/common/utils/default/DeviceFileReader.cpp
+++ b/gnss/common/utils/default/DeviceFileReader.cpp
@@ -32,40 +32,52 @@
return;
}
- int mGnssFd = open(deviceFilePath.c_str(), O_RDWR | O_NONBLOCK);
-
- if (mGnssFd == -1) {
+ int gnss_fd, epoll_fd;
+ if ((gnss_fd = open(deviceFilePath.c_str(), O_RDWR | O_NONBLOCK)) == -1) {
+ return;
+ }
+ if (write(gnss_fd, command.c_str(), command.size()) <= 0) {
+ close(gnss_fd);
return;
}
- int bytes_write = write(mGnssFd, command.c_str(), command.size());
- if (bytes_write <= 0) {
- close(mGnssFd);
+ // Create an epoll instance.
+ if ((epoll_fd = epoll_create1(EPOLL_CLOEXEC)) < 0) {
+ close(gnss_fd);
return;
}
+ // Add file descriptor to epoll instance.
struct epoll_event ev, events[1];
- ev.data.fd = mGnssFd;
+ memset(&ev, 0, sizeof(ev));
+ ev.data.fd = gnss_fd;
ev.events = EPOLLIN;
- int epoll_fd = epoll_create1(0);
- epoll_ctl(epoll_fd, EPOLL_CTL_ADD, mGnssFd, &ev);
+ if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, gnss_fd, &ev) == -1) {
+ close(gnss_fd);
+ close(epoll_fd);
+ return;
+ }
+
+ // Wait for device file event.
+ if (epoll_wait(epoll_fd, events, 1, mMinIntervalMs) == -1) {
+ close(gnss_fd);
+ close(epoll_fd);
+ return;
+ }
+
+ // Handle event and write data to string buffer.
int bytes_read = -1;
std::string inputStr = "";
- int epoll_ret = epoll_wait(epoll_fd, events, 1, mMinIntervalMs);
-
- if (epoll_ret == -1) {
- close(mGnssFd);
- return;
- }
while (true) {
memset(inputBuffer, 0, INPUT_BUFFER_SIZE);
- bytes_read = read(mGnssFd, &inputBuffer, INPUT_BUFFER_SIZE);
+ bytes_read = read(gnss_fd, &inputBuffer, INPUT_BUFFER_SIZE);
if (bytes_read <= 0) {
break;
}
s_buffer_ += std::string(inputBuffer, bytes_read);
}
- close(mGnssFd);
+ close(gnss_fd);
+ close(epoll_fd);
// Trim end of file mark(\n\n\n\n).
auto pos = s_buffer_.find("\n\n\n\n");
diff --git a/gnss/common/utils/default/Utils.cpp b/gnss/common/utils/default/Utils.cpp
index 2aed29b..8303d93 100644
--- a/gnss/common/utils/default/Utils.cpp
+++ b/gnss/common/utils/default/Utils.cpp
@@ -102,7 +102,7 @@
.receivedSvTimeUncertaintyInNs = 15,
.cN0DbHz = 30.0,
.pseudorangeRateMps = -484.13739013671875,
- .pseudorangeRateUncertaintyMps = 1.0379999876022339,
+ .pseudorangeRateUncertaintyMps = 0.1037999987602233,
.accumulatedDeltaRangeState = (uint32_t)V1_0::IGnssMeasurementCallback::
GnssAccumulatedDeltaRangeState::ADR_STATE_UNKNOWN,
.accumulatedDeltaRangeM = 0.0,
@@ -169,7 +169,7 @@
.basebandCN0DbHz = 26.5,
.agcLevelDb = 2.3,
.pseudorangeRateMps = -484.13739013671875,
- .pseudorangeRateUncertaintyMps = 1.0379999876022339,
+ .pseudorangeRateUncertaintyMps = 0.1037999987602233,
.accumulatedDeltaRangeState = GnssMeasurement::ADR_STATE_VALID,
.accumulatedDeltaRangeM = 1.52,
.accumulatedDeltaRangeUncertaintyM = 2.43,
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HdrConversionCapability.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HdrConversionCapability.aidl
index 66151ca..b74f7d7 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HdrConversionCapability.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HdrConversionCapability.aidl
@@ -34,7 +34,7 @@
package android.hardware.graphics.common;
@VintfStability
parcelable HdrConversionCapability {
- android.hardware.graphics.common.ParcelableHdr sourceType;
- @nullable android.hardware.graphics.common.ParcelableHdr outputType;
+ android.hardware.graphics.common.Hdr sourceType;
+ android.hardware.graphics.common.Hdr outputType;
boolean addsLatency;
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ParcelableHdr.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ParcelableHdr.aidl
deleted file mode 100644
index 788bd4e..0000000
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ParcelableHdr.aidl
+++ /dev/null
@@ -1,38 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.graphics.common;
-@VintfStability
-parcelable ParcelableHdr {
- android.hardware.graphics.common.Hdr hdr;
-}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/Hdr.aidl b/graphics/common/aidl/android/hardware/graphics/common/Hdr.aidl
index 6107c4c..c9ba16b 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/Hdr.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/Hdr.aidl
@@ -24,7 +24,7 @@
@Backing(type="int")
enum Hdr {
/**
- * Invalid HDR type
+ * Invalid HDR type
*/
INVALID = 0,
/**
diff --git a/graphics/common/aidl/android/hardware/graphics/common/HdrConversionCapability.aidl b/graphics/common/aidl/android/hardware/graphics/common/HdrConversionCapability.aidl
index 53b3256..d8524a5 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/HdrConversionCapability.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/HdrConversionCapability.aidl
@@ -16,22 +16,26 @@
package android.hardware.graphics.common;
-import android.hardware.graphics.common.ParcelableHdr;
+import android.hardware.graphics.common.Hdr;
/**
* Output parameter for IComposerClient.getHdrConversionCapabilities
- *
- * @param sourceType is the HDR type that can be converted to outputType.
- *
- * @param outputType is the HDR type/ SDR that the source type can be converted to. The value null
- * is used to depict SDR outputType.
- *
- * @param addsLatency is false if no latency added due to HDR conversion from sourceType to
- * outputType, otherwise true.
*/
@VintfStability
parcelable HdrConversionCapability {
- ParcelableHdr sourceType;
- @nullable ParcelableHdr outputType;
+ /** sourceType is the HDR type that can be converted to outputType */
+ Hdr sourceType;
+
+ /**
+ * outputType is the HDR type/ SDR that the source type can be converted to. The value INVALID
+ * is used to depict SDR outputType.
+ */
+
+ Hdr outputType;
+
+ /**
+ * addsLatency is false if no latency added due to HDR conversion from sourceType to
+ * outputType, otherwise true.
+ */
boolean addsLatency;
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/HdrConversionStrategy.aidl b/graphics/common/aidl/android/hardware/graphics/common/HdrConversionStrategy.aidl
index f564e9f..71beaa0 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/HdrConversionStrategy.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/HdrConversionStrategy.aidl
@@ -15,25 +15,32 @@
*/
package android.hardware.graphics.common;
+
+import android.hardware.graphics.common.Hdr;
/**
* Input parameter for IComposerClient.setHdrConversionStrategy
- *
- * @param passthrough - When this parameter is set to true, HDR conversion is disabled by the
- * implementation. The output HDR type will change dynamically to match the content. This value is
- * never set to false, as other union values will be present in the false case.
- *
- * @param autoAllowedHdrTypes - When this parameter is set, the output HDR type is selected by the
- * implementation. The implementation is only allowed to set the output HDR type to the HDR types
- * present in this list. If conversion to any of the autoHdrTypes types is not possible, the
- * implementation should do no conversion.
- *
- * @param forceHdrConversion - When this parameter is set, the implementation should convert all
- * content to this HDR type, when possible. If not possible, the functionality should be similar to
- * passthrough=true.
*/
@VintfStability
union HdrConversionStrategy {
+ /**
+ * When this parameter is set to true, HDR conversion is disabled by the
+ * implementation. The output HDR type will change dynamically to match the content. This value
+ * is never set to false, as other union values will be present in the false case.
+ */
boolean passthrough = true;
- android.hardware.graphics.common.Hdr[] autoAllowedHdrTypes;
- android.hardware.graphics.common.Hdr forceHdrConversion;
+
+ /**
+ * When this parameter is set, the output HDR type is selected by the
+ * implementation. The implementation is only allowed to set the output HDR type to the HDR
+ * types present in this list. If conversion to any of the autoHdrTypes types is not possible,
+ * the implementation should do no conversion.
+ */
+ Hdr[] autoAllowedHdrTypes;
+
+ /**
+ * When this parameter is set, the implementation should convert all
+ * content to this HDR type, when possible. If not possible, the functionality should be similar
+ * to passthrough=true.
+ */
+ Hdr forceHdrConversion;
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/ParcelableHdr.aidl b/graphics/common/aidl/android/hardware/graphics/common/ParcelableHdr.aidl
deleted file mode 100644
index 9aff277..0000000
--- a/graphics/common/aidl/android/hardware/graphics/common/ParcelableHdr.aidl
+++ /dev/null
@@ -1,24 +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.graphics.common;
-
-import android.hardware.graphics.common.Hdr;
-
-@VintfStability
-parcelable ParcelableHdr {
- Hdr hdr;
-}
diff --git a/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp b/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp
index 4fb5d01..7b3a2b4 100644
--- a/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp
+++ b/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp
@@ -29,6 +29,11 @@
mVsyncAllowed = allowed;
}
+void GraphicsComposerCallback::setRefreshRateChangedDebugDataEnabledCallbackAllowed(bool allowed) {
+ std::scoped_lock lock(mMutex);
+ mRefreshRateChangedDebugDataEnabledCallbackAllowed = allowed;
+}
+
std::vector<int64_t> GraphicsComposerCallback::getDisplays() const {
std::scoped_lock lock(mMutex);
return mDisplays;
@@ -79,6 +84,21 @@
return ret;
}
+std::vector<RefreshRateChangedDebugData>
+GraphicsComposerCallback::takeListOfRefreshRateChangedDebugData() {
+ std::scoped_lock lock(mMutex);
+
+ std::vector<RefreshRateChangedDebugData> ret;
+ ret.swap(mRefreshRateChangedDebugData);
+
+ return ret;
+}
+
+int32_t GraphicsComposerCallback::getInvalidRefreshRateDebugEnabledCallbackCount() const {
+ std::scoped_lock lock(mMutex);
+ return mInvalidRefreshRateDebugEnabledCallbackCount;
+}
+
::ndk::ScopedAStatus GraphicsComposerCallback::onHotplug(int64_t in_display, bool in_connected) {
std::scoped_lock lock(mMutex);
@@ -125,9 +145,16 @@
}
::ndk::ScopedAStatus GraphicsComposerCallback::onRefreshRateChangedDebug(
- const RefreshRateChangedDebugData&) {
- // TODO(b/202734676) Add implementation for Vts tests
- return ::ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ const RefreshRateChangedDebugData& data) {
+ std::scoped_lock lock(mMutex);
+
+ const auto it = std::find(mDisplays.begin(), mDisplays.end(), data.display);
+ if (mRefreshRateChangedDebugDataEnabledCallbackAllowed && it != mDisplays.end()) {
+ mRefreshRateChangedDebugData.push_back(data);
+ } else {
+ mInvalidRefreshRateDebugEnabledCallbackCount++;
+ }
+ return ::ndk::ScopedAStatus::ok();
}
::ndk::ScopedAStatus GraphicsComposerCallback::onVsyncPeriodTimingChanged(
diff --git a/graphics/composer/aidl/vts/GraphicsComposerCallback.h b/graphics/composer/aidl/vts/GraphicsComposerCallback.h
index 9c3bc70..13e992a 100644
--- a/graphics/composer/aidl/vts/GraphicsComposerCallback.h
+++ b/graphics/composer/aidl/vts/GraphicsComposerCallback.h
@@ -26,6 +26,8 @@
public:
void setVsyncAllowed(bool allowed);
+ void setRefreshRateChangedDebugDataEnabledCallbackAllowed(bool allowed);
+
std::vector<int64_t> getDisplays() const;
int32_t getInvalidHotplugCount() const;
@@ -44,6 +46,10 @@
std::optional<VsyncPeriodChangeTimeline> takeLastVsyncPeriodChangeTimeline();
+ std::vector<RefreshRateChangedDebugData> takeListOfRefreshRateChangedDebugData();
+
+ int32_t getInvalidRefreshRateDebugEnabledCallbackCount() const;
+
private:
virtual ::ndk::ScopedAStatus onHotplug(int64_t in_display, bool in_connected) override;
virtual ::ndk::ScopedAStatus onRefresh(int64_t in_display) override;
@@ -63,9 +69,13 @@
std::vector<int64_t> mDisplays GUARDED_BY(mMutex);
// true only when vsync is enabled
bool mVsyncAllowed GUARDED_BY(mMutex) = true;
+ // true only when RefreshRateChangedCallbackDebugEnabled is set to true.
+ bool mRefreshRateChangedDebugDataEnabledCallbackAllowed GUARDED_BY(mMutex) = false;
std::optional<VsyncPeriodChangeTimeline> mTimeline GUARDED_BY(mMutex);
+ std::vector<RefreshRateChangedDebugData> mRefreshRateChangedDebugData GUARDED_BY(mMutex);
+
int32_t mVsyncIdleCount GUARDED_BY(mMutex) = 0;
int64_t mVsyncIdleTime GUARDED_BY(mMutex) = 0;
@@ -75,6 +85,7 @@
int32_t mInvalidVsyncCount GUARDED_BY(mMutex) = 0;
int32_t mInvalidVsyncPeriodChangeCount GUARDED_BY(mMutex) = 0;
int32_t mInvalidSeamlessPossibleCount GUARDED_BY(mMutex) = 0;
+ int32_t mInvalidRefreshRateDebugEnabledCallbackCount GUARDED_BY(mMutex) = 0;
};
} // namespace aidl::android::hardware::graphics::composer3::vts
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.cpp b/graphics/composer/aidl/vts/VtsComposerClient.cpp
index e03ef25..25b0ca0 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.cpp
+++ b/graphics/composer/aidl/vts/VtsComposerClient.cpp
@@ -119,6 +119,24 @@
return updateDisplayProperties(vtsDisplay, config);
}
+ScopedAStatus VtsComposerClient::setPeakRefreshRateConfig(VtsDisplay* vtsDisplay) {
+ const auto displayId = vtsDisplay->getDisplayId();
+ auto [activeStatus, activeConfig] = getActiveConfig(displayId);
+ EXPECT_TRUE(activeStatus.isOk());
+ auto peakDisplayConfig = vtsDisplay->getDisplayConfig(activeConfig);
+ auto peakConfig = activeConfig;
+
+ const auto displayConfigs = vtsDisplay->getDisplayConfigs();
+ for (const auto [config, displayConfig] : displayConfigs) {
+ if (displayConfig.configGroup == peakDisplayConfig.configGroup &&
+ displayConfig.vsyncPeriod < peakDisplayConfig.vsyncPeriod) {
+ peakDisplayConfig = displayConfig;
+ peakConfig = config;
+ }
+ }
+ return setActiveConfig(vtsDisplay, peakConfig);
+}
+
std::pair<ScopedAStatus, int32_t> VtsComposerClient::getDisplayAttribute(
int64_t display, int32_t config, DisplayAttribute displayAttribute) {
int32_t outDisplayAttribute;
@@ -375,10 +393,15 @@
return mComposerCallback->getVsyncIdleTime();
}
-ndk::ScopedAStatus VtsComposerClient::setRefreshRateChangedCallbackDebugEnabled(
- int64_t /* display */, bool /* enabled */) {
- // TODO(b/202734676) Add implementation for VTS tests
- return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ndk::ScopedAStatus VtsComposerClient::setRefreshRateChangedCallbackDebugEnabled(int64_t display,
+ bool enabled) {
+ mComposerCallback->setRefreshRateChangedDebugDataEnabledCallbackAllowed(enabled);
+ return mComposerClient->setRefreshRateChangedCallbackDebugEnabled(display, enabled);
+}
+
+std::vector<RefreshRateChangedDebugData>
+VtsComposerClient::takeListOfRefreshRateChangedDebugData() {
+ return mComposerCallback->takeListOfRefreshRateChangedDebugData();
}
int64_t VtsComposerClient::getInvalidDisplayId() {
@@ -545,6 +568,10 @@
ALOGE("Invalid seamless possible count");
isValid = false;
}
+ if (mComposerCallback->getInvalidRefreshRateDebugEnabledCallbackCount() != 0) {
+ ALOGE("Invalid refresh rate debug enabled callback count");
+ isValid = false;
+ }
}
return isValid;
}
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.h b/graphics/composer/aidl/vts/VtsComposerClient.h
index 81a62b3..ea3318c 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.h
+++ b/graphics/composer/aidl/vts/VtsComposerClient.h
@@ -77,6 +77,8 @@
ScopedAStatus setActiveConfig(VtsDisplay* vtsDisplay, int32_t config);
+ ScopedAStatus setPeakRefreshRateConfig(VtsDisplay* vtsDisplay);
+
std::pair<ScopedAStatus, int32_t> getDisplayAttribute(int64_t display, int32_t config,
DisplayAttribute displayAttribute);
@@ -183,6 +185,10 @@
std::pair<ScopedAStatus, OverlayProperties> getOverlaySupport();
+ ndk::ScopedAStatus setRefreshRateChangedCallbackDebugEnabled(int64_t display, bool enabled);
+
+ std::vector<RefreshRateChangedDebugData> takeListOfRefreshRateChangedDebugData();
+
private:
ScopedAStatus addDisplayConfig(VtsDisplay* vtsDisplay, int32_t config);
ScopedAStatus updateDisplayProperties(VtsDisplay* vtsDisplay, int32_t config);
@@ -197,9 +203,6 @@
bool verifyComposerCallbackParams();
- ndk::ScopedAStatus setRefreshRateChangedCallbackDebugEnabled(int64_t /* display */,
- bool /* enabled */);
-
// Keep track of displays and layers. When a test fails/ends,
// the VtsComposerClient::tearDown should be called from the
// test tearDown to clean up the resources for the test.
@@ -245,15 +248,17 @@
};
void addDisplayConfig(int32_t config, DisplayConfig displayConfig) {
- displayConfigs.insert({config, displayConfig});
+ mDisplayConfigs.insert({config, displayConfig});
}
- DisplayConfig getDisplayConfig(int32_t config) { return displayConfigs.find(config)->second; }
+ DisplayConfig getDisplayConfig(int32_t config) { return mDisplayConfigs.find(config)->second; }
+
+ std::unordered_map<int32_t, DisplayConfig> getDisplayConfigs() { return mDisplayConfigs; }
private:
int64_t mDisplayId;
int32_t mDisplayWidth;
int32_t mDisplayHeight;
- std::unordered_map<int32_t, DisplayConfig> displayConfigs;
+ std::unordered_map<int32_t, DisplayConfig> mDisplayConfigs;
};
} // namespace aidl::android::hardware::graphics::composer3::vts
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 70c4e4c..746330b 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -650,10 +650,10 @@
}
const auto& [status, conversionCapabilities] = mComposerClient->getHdrConversionCapabilities();
for (auto conversionCapability : conversionCapabilities) {
- if (conversionCapability.outputType) {
+ if (conversionCapability.outputType != common::Hdr::INVALID) {
common::HdrConversionStrategy hdrConversionStrategy;
hdrConversionStrategy.set<common::HdrConversionStrategy::Tag::forceHdrConversion>(
- conversionCapability.outputType->hdr);
+ conversionCapability.outputType);
const auto& [statusSet, preferredHdrOutputType] =
mComposerClient->setHdrConversionStrategy(hdrConversionStrategy);
EXPECT_TRUE(statusSet.isOk());
@@ -670,8 +670,8 @@
const auto& [status, conversionCapabilities] = mComposerClient->getHdrConversionCapabilities();
std::vector<aidl::android::hardware::graphics::common::Hdr> autoHdrTypes;
for (auto conversionCapability : conversionCapabilities) {
- if (conversionCapability.outputType) {
- autoHdrTypes.push_back(conversionCapability.outputType->hdr);
+ if (conversionCapability.outputType != common::Hdr::INVALID) {
+ autoHdrTypes.push_back(conversionCapability.outputType);
}
}
common::HdrConversionStrategy hdrConversionStrategy;
@@ -874,6 +874,13 @@
}
TEST_P(GraphicsComposerAidlTest, GetOverlaySupport) {
+ const auto& [versionStatus, version] = mComposerClient->getInterfaceVersion();
+ ASSERT_TRUE(versionStatus.isOk());
+ if (version == 1) {
+ GTEST_SUCCEED() << "Device does not support the new API for overlay support";
+ return;
+ }
+
const auto& [status, properties] = mComposerClient->getOverlaySupport();
if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
status.getServiceSpecificError() == IComposerClient::EX_UNSUPPORTED) {
@@ -1210,6 +1217,14 @@
}
}
+ bool checkIfCallbackRefreshRateChangedDebugEnabledReceived(
+ std::function<bool(RefreshRateChangedDebugData)> filter) {
+ const auto list = mComposerClient->takeListOfRefreshRateChangedDebugData();
+ return std::any_of(list.begin(), list.end(), [&](auto refreshRateChangedDebugData) {
+ return filter(refreshRateChangedDebugData);
+ });
+ }
+
sp<GraphicBuffer> allocate(::android::PixelFormat pixelFormat) {
return sp<GraphicBuffer>::make(
static_cast<uint32_t>(getPrimaryDisplay().getDisplayWidth()),
@@ -1309,7 +1324,7 @@
return vsyncPeriod;
}
- int64_t createOnScreenLayer() {
+ int64_t createOnScreenLayer(Composition composition = Composition::DEVICE) {
const auto& [status, layer] =
mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount);
EXPECT_TRUE(status.isOk());
@@ -1317,12 +1332,25 @@
getPrimaryDisplay().getDisplayHeight()};
FRect cropRect{0, 0, (float)getPrimaryDisplay().getDisplayWidth(),
(float)getPrimaryDisplay().getDisplayHeight()};
- configureLayer(getPrimaryDisplay(), layer, Composition::DEVICE, displayFrame, cropRect);
+ configureLayer(getPrimaryDisplay(), layer, composition, displayFrame, cropRect);
auto& writer = getWriter(getPrimaryDisplayId());
writer.setLayerDataspace(getPrimaryDisplayId(), layer, common::Dataspace::UNKNOWN);
return layer;
}
+ void sendBufferUpdate(int64_t layer) {
+ const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer->handle);
+
+ auto& writer = getWriter(getPrimaryDisplayId());
+ writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, buffer->handle,
+ /*acquireFence*/ -1);
+
+ const sp<::android::Fence> presentFence =
+ presentAndGetFence(ComposerClientWriter::kNoTimestamp);
+ presentFence->waitForever(LOG_TAG);
+ }
+
bool hasDisplayCapability(int64_t display, DisplayCapability cap) {
const auto& [status, capabilities] = mComposerClient->getDisplayCapabilities(display);
EXPECT_TRUE(status.isOk());
@@ -2261,6 +2289,176 @@
EXPECT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::OFF).isOk());
}
+TEST_P(GraphicsComposerAidlCommandTest, SetRefreshRateChangedCallbackDebug_Unsupported) {
+ if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
+ auto status = mComposerClient->setRefreshRateChangedCallbackDebugEnabled(
+ getPrimaryDisplayId(), /*enabled*/ true);
+ EXPECT_FALSE(status.isOk());
+ EXPECT_NO_FATAL_FAILURE(
+ assertServiceSpecificError(status, IComposerClient::EX_UNSUPPORTED));
+
+ status = mComposerClient->setRefreshRateChangedCallbackDebugEnabled(getPrimaryDisplayId(),
+ /*enabled*/ false);
+ EXPECT_FALSE(status.isOk());
+ EXPECT_NO_FATAL_FAILURE(
+ assertServiceSpecificError(status, IComposerClient::EX_UNSUPPORTED));
+ }
+}
+
+TEST_P(GraphicsComposerAidlCommandTest, SetRefreshRateChangedCallbackDebug_Enabled) {
+ if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
+ GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
+ return;
+ }
+
+ const auto displayId = getPrimaryDisplayId();
+ EXPECT_TRUE(mComposerClient->setPowerMode(displayId, PowerMode::ON).isOk());
+ // Enable the callback
+ ASSERT_TRUE(mComposerClient
+ ->setRefreshRateChangedCallbackDebugEnabled(displayId,
+ /*enabled*/ true)
+ .isOk());
+ std::this_thread::sleep_for(100ms);
+
+ const auto displayFilter = [displayId](auto refreshRateChangedDebugData) {
+ return displayId == refreshRateChangedDebugData.display;
+ };
+
+ // Check that we immediately got a callback
+ EXPECT_TRUE(checkIfCallbackRefreshRateChangedDebugEnabledReceived(displayFilter));
+
+ ASSERT_TRUE(mComposerClient
+ ->setRefreshRateChangedCallbackDebugEnabled(displayId,
+ /*enabled*/ false)
+ .isOk());
+}
+
+TEST_P(GraphicsComposerAidlCommandTest,
+ SetRefreshRateChangedCallbackDebugEnabled_noCallbackWhenIdle) {
+ if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
+ GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
+ return;
+ }
+
+ auto display = getEditablePrimaryDisplay();
+ const auto displayId = display.getDisplayId();
+
+ if (!hasDisplayCapability(displayId, DisplayCapability::DISPLAY_IDLE_TIMER)) {
+ GTEST_SUCCEED() << "DisplayCapability::DISPLAY_IDLE_TIMER is not supported";
+ return;
+ }
+
+ EXPECT_TRUE(mComposerClient->setPowerMode(displayId, PowerMode::ON).isOk());
+ EXPECT_TRUE(mComposerClient->setPeakRefreshRateConfig(&display).isOk());
+
+ ASSERT_TRUE(mComposerClient->setIdleTimerEnabled(displayId, /*timeoutMs*/ 500).isOk());
+ // Enable the callback
+ ASSERT_TRUE(mComposerClient
+ ->setRefreshRateChangedCallbackDebugEnabled(displayId,
+ /*enabled*/ true)
+ .isOk());
+
+ const auto displayFilter = [displayId](auto refreshRateChangedDebugData) {
+ return displayId == refreshRateChangedDebugData.display;
+ };
+
+ int retryCount = 3;
+ do {
+ // Wait for 1s so that we enter the idle state
+ std::this_thread::sleep_for(1s);
+ if (!checkIfCallbackRefreshRateChangedDebugEnabledReceived(displayFilter)) {
+ // DID NOT receive a callback, we are in the idle state.
+ break;
+ }
+ } while (--retryCount > 0);
+
+ if (retryCount == 0) {
+ GTEST_SUCCEED() << "Unable to enter the idle mode";
+ return;
+ }
+
+ // Send the REFRESH_RATE_INDICATOR update
+ ASSERT_NO_FATAL_FAILURE(
+ sendBufferUpdate(createOnScreenLayer(Composition::REFRESH_RATE_INDICATOR)));
+ std::this_thread::sleep_for(1s);
+ EXPECT_FALSE(checkIfCallbackRefreshRateChangedDebugEnabledReceived(displayFilter))
+ << "A callback should not be received for REFRESH_RATE_INDICATOR";
+
+ EXPECT_TRUE(mComposerClient
+ ->setRefreshRateChangedCallbackDebugEnabled(displayId,
+ /*enabled*/ false)
+ .isOk());
+}
+
+TEST_P(GraphicsComposerAidlCommandTest,
+ SetRefreshRateChangedCallbackDebugEnabled_SetActiveConfigWithConstraints) {
+ if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
+ GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
+ return;
+ }
+
+ VsyncPeriodChangeConstraints constraints;
+ constraints.seamlessRequired = false;
+ constraints.desiredTimeNanos = systemTime();
+
+ for (VtsDisplay& display : mDisplays) {
+ const auto displayId = display.getDisplayId();
+ EXPECT_TRUE(mComposerClient->setPowerMode(displayId, PowerMode::ON).isOk());
+
+ // Enable the callback
+ ASSERT_TRUE(mComposerClient
+ ->setRefreshRateChangedCallbackDebugEnabled(displayId, /*enabled*/ true)
+ .isOk());
+
+ forEachTwoConfigs(displayId, [&](int32_t config1, int32_t config2) {
+ const int32_t vsyncPeriod1 = display.getDisplayConfig(config1).vsyncPeriod;
+ const int32_t vsyncPeriod2 = display.getDisplayConfig(config2).vsyncPeriod;
+
+ if (vsyncPeriod1 == vsyncPeriod2) {
+ return; // continue
+ }
+
+ EXPECT_TRUE(mComposerClient->setActiveConfig(&display, config1).isOk());
+ sendRefreshFrame(display, nullptr);
+
+ const auto& [status, timeline] =
+ mComposerClient->setActiveConfigWithConstraints(&display, config2, constraints);
+ EXPECT_TRUE(status.isOk());
+
+ if (timeline.refreshRequired) {
+ sendRefreshFrame(display, &timeline);
+ }
+
+ const auto callbackFilter = [displayId,
+ vsyncPeriod2](auto refreshRateChangedDebugData) {
+ constexpr int kVsyncThreshold = 1000;
+ return displayId == refreshRateChangedDebugData.display &&
+ std::abs(vsyncPeriod2 - refreshRateChangedDebugData.vsyncPeriodNanos) <=
+ kVsyncThreshold;
+ };
+
+ int retryCount = 3;
+ do {
+ std::this_thread::sleep_for(100ms);
+ if (checkIfCallbackRefreshRateChangedDebugEnabledReceived(callbackFilter)) {
+ GTEST_SUCCEED() << "Received a callback successfully";
+ break;
+ }
+ } while (--retryCount > 0);
+
+ if (retryCount == 0) {
+ GTEST_FAIL() << "failed to get a callback for the display " << displayId
+ << " with config " << config2;
+ }
+ });
+
+ EXPECT_TRUE(
+ mComposerClient
+ ->setRefreshRateChangedCallbackDebugEnabled(displayId, /*enabled*/ false)
+ .isOk());
+ }
+}
+
/*
* Test that no two display configs are exactly the same.
*/
diff --git a/graphics/mapper/2.0/default/passthrough.cpp b/graphics/mapper/2.0/default/passthrough.cpp
index e18b88f..93d6d99 100644
--- a/graphics/mapper/2.0/default/passthrough.cpp
+++ b/graphics/mapper/2.0/default/passthrough.cpp
@@ -19,6 +19,14 @@
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 c7f0cf5..c99c984 100644
--- a/graphics/mapper/2.1/default/passthrough.cpp
+++ b/graphics/mapper/2.1/default/passthrough.cpp
@@ -19,6 +19,14 @@
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/default/Health.cpp b/health/aidl/default/Health.cpp
index 15a3dbc..f401643 100644
--- a/health/aidl/default/Health.cpp
+++ b/health/aidl/default/Health.cpp
@@ -148,6 +148,11 @@
!res.isOk()) {
LOG(WARNING) << "Cannot get First_usage_date: " << res.getDescription();
}
+ if (auto res = GetProperty<int64_t>(&battery_monitor_, ::android::BATTERY_PROP_STATE_OF_HEALTH,
+ 0, &out->batteryStateOfHealth);
+ !res.isOk()) {
+ LOG(WARNING) << "Cannot get Battery_state_of_health: " << res.getDescription();
+ }
return ndk::ScopedAStatus::ok();
}
diff --git a/identity/aidl/android/hardware/identity/IIdentityCredential.aidl b/identity/aidl/android/hardware/identity/IIdentityCredential.aidl
index abdb00b..df8e2bd 100644
--- a/identity/aidl/android/hardware/identity/IIdentityCredential.aidl
+++ b/identity/aidl/android/hardware/identity/IIdentityCredential.aidl
@@ -370,7 +370,8 @@
* - issuer: CN shall be set to "Android Identity Credential Key". (fixed value:
* same on all certs)
*
- * - validity: should be from current time and one year in the future (365 days).
+ * - validity: should be from current time and 31536000 seconds in the
+ * future (approximately 365 days).
*
* - subjectPublicKeyInfo: must contain attested public key.
*
diff --git a/identity/aidl/vts/Util.cpp b/identity/aidl/vts/Util.cpp
index f3d7c30..4f5c121 100644
--- a/identity/aidl/vts/Util.cpp
+++ b/identity/aidl/vts/Util.cpp
@@ -523,8 +523,24 @@
int64_t allowDriftSecs = 10;
EXPECT_LE(-allowDriftSecs, diffSecs);
EXPECT_GE(allowDriftSecs, diffSecs);
- constexpr uint64_t kSecsInOneYear = 365 * 24 * 60 * 60;
- EXPECT_EQ(notBefore + kSecsInOneYear, notAfter);
+
+ // The AIDL spec used to call for "one year in the future (365
+ // days)" but was updated to say "current time and 31536000
+ // seconds in the future (approximately 365 days)" to clarify that
+ // this was the original intention.
+ //
+ // However a number of implementations interpreted this as a
+ // "literal year" which started causing problems in March 2023
+ // because 2024 is a leap year. Since the extra day doesn't really
+ // matter (the validity period is specified in the MSO anyway and
+ // that's what RPs use), we allow both interpretations.
+ //
+ // For simplicity, we just require that that notAfter is after
+ // 31536000 and which also covers the case if there's a leap-day
+ // and possible leap-seconds.
+ //
+ constexpr uint64_t kSecsIn365Days = 365 * 24 * 60 * 60;
+ EXPECT_LE(notBefore + kSecsIn365Days, notAfter);
}
vector<RequestNamespace> buildRequestNamespaces(const vector<TestEntryData> entries) {
diff --git a/keymaster/4.0/vts/performance/Benchmark.cpp b/keymaster/4.0/vts/performance/Benchmark.cpp
index 96ef5bf..e5fdff2 100644
--- a/keymaster/4.0/vts/performance/Benchmark.cpp
+++ b/keymaster/4.0/vts/performance/Benchmark.cpp
@@ -315,7 +315,7 @@
SecurityLevel getSecurityLevel() { return securityLevel_; }
- const string& GenerateMessage(int size) {
+ const string GenerateMessage(int size) {
for (const string& message : message_cache_) {
if (message.size() == size) {
return message;
@@ -323,7 +323,7 @@
}
string message = string(size, 'x');
message_cache_.push_back(message);
- return std::move(message);
+ return message;
}
optional<BlockMode> getBlockMode(string transform) {
@@ -714,4 +714,4 @@
return 1;
}
::benchmark::RunSpecifiedBenchmarks();
-}
\ No newline at end of file
+}
diff --git a/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp b/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp
old mode 100755
new mode 100644
index 00e9837..d80e651
--- a/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp
+++ b/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp
@@ -374,21 +374,16 @@
}
}
-static int getFirstApiLevel() {
- int boardApiLevel = android::base::GetIntProperty("ro.board.first_api_level", 0);
- if (boardApiLevel != 0) {
- return boardApiLevel;
- }
-
- return android::base::GetIntProperty("ro.product.first_api_level", __ANDROID_API_T__);
-}
-
static bool isTV() {
return testing::deviceSupportsFeature("android.software.leanback");
}
// list components and roles.
TEST_P(StoreHidlTest, OmxCodecAllowedTest) {
+ static int sBoardFirstApiLevel = android::base::GetIntProperty("ro.board.first_api_level", 0);
+ if (sBoardFirstApiLevel == 0) {
+ GTEST_SKIP() << "board first API level not detected";
+ }
hidl_vec<IOmx::ComponentInfo> componentInfos = getComponentInfoList(omx);
for (IOmx::ComponentInfo info : componentInfos) {
for (std::string role : info.mRoles) {
@@ -396,27 +391,27 @@
role.find("video_encoder") != std::string::npos) {
// Codec2 is not mandatory on Android TV devices that launched with Android S
if (isTV()) {
- ASSERT_LT(getFirstApiLevel(), __ANDROID_API_T__)
+ ASSERT_LT(sBoardFirstApiLevel, __ANDROID_API_T__)
<< " Component: " << info.mName.c_str() << " Role: " << role.c_str()
<< " not allowed for devices launching with Android T and above";
} else {
std::string codecName = info.mName;
bool isAndroidCodec = (codecName.rfind("OMX.google", 0) != std::string::npos);
- if (isAndroidCodec && (getFirstApiLevel() <= __ANDROID_API_S__)) {
+ if (isAndroidCodec && (sBoardFirstApiLevel <= __ANDROID_API_S__)) {
// refer b/230582620
// S AOSP build did not remove the OMX.google video codecs
// so it is infeasible to require no OMX.google.* video codecs
// on S launching devices
} else {
- ASSERT_LT(getFirstApiLevel(), __ANDROID_API_S__)
- << " Component: " << info.mName.c_str() << " Role: " << role.c_str()
- << " not allowed for devices launching with Android S and above";
+ ASSERT_LT(sBoardFirstApiLevel, __ANDROID_API_S__)
+ << " Component: " << info.mName.c_str() << " Role: " << role.c_str()
+ << " not allowed for devices launching with Android S and above";
}
}
}
if (role.find("audio_decoder") != std::string::npos ||
role.find("audio_encoder") != std::string::npos) {
- ASSERT_LT(getFirstApiLevel(), __ANDROID_API_T__)
+ ASSERT_LT(sBoardFirstApiLevel, __ANDROID_API_T__)
<< " Component: " << info.mName.c_str() << " Role: " << role.c_str()
<< " not allowed for devices launching with Android T and above";
}
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..5539b9c 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/Android.bp b/radio/aidl/Android.bp
index dfccb4c..e8cebd7 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -262,19 +262,3 @@
},
},
}
-
-aidl_interface {
- name: "android.hardware.radio.satellite",
- vendor_available: true,
- srcs: ["android/hardware/radio/satellite/*.aidl"],
- stability: "vintf",
- imports: ["android.hardware.radio-V2"],
- backend: {
- cpp: {
- enabled: false,
- },
- java: {
- sdk_version: "module_current",
- },
- },
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
index 84376b7..37e3b25 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
@@ -34,13 +34,13 @@
package android.hardware.radio.ims.media;
@Backing(type="int") @VintfStability
enum AmrMode {
- AMR_MODE_0 = (1 << 0),
- AMR_MODE_1 = (1 << 1),
- AMR_MODE_2 = (1 << 2),
- AMR_MODE_3 = (1 << 3),
- AMR_MODE_4 = (1 << 4),
- AMR_MODE_5 = (1 << 5),
- AMR_MODE_6 = (1 << 6),
- AMR_MODE_7 = (1 << 7),
- AMR_MODE_8 = (1 << 8),
+ AMR_MODE_0 = (1 << 0) /* 1 */,
+ AMR_MODE_1 = (1 << 1) /* 2 */,
+ AMR_MODE_2 = (1 << 2) /* 4 */,
+ AMR_MODE_3 = (1 << 3) /* 8 */,
+ AMR_MODE_4 = (1 << 4) /* 16 */,
+ AMR_MODE_5 = (1 << 5) /* 32 */,
+ AMR_MODE_6 = (1 << 6) /* 64 */,
+ AMR_MODE_7 = (1 << 7) /* 128 */,
+ AMR_MODE_8 = (1 << 8) /* 256 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
index 9eaf129..e4193cd 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
@@ -34,9 +34,9 @@
package android.hardware.radio.ims.media;
@Backing(type="int") @VintfStability
enum CodecType {
- AMR = (1 << 0),
- AMR_WB = (1 << 1),
- EVS = (1 << 2),
- PCMA = (1 << 3),
- PCMU = (1 << 4),
+ AMR = (1 << 0) /* 1 */,
+ AMR_WB = (1 << 1) /* 2 */,
+ EVS = (1 << 2) /* 4 */,
+ PCMA = (1 << 3) /* 8 */,
+ PCMU = (1 << 4) /* 16 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl
index 5e80f91..db3eb29 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl
@@ -35,8 +35,8 @@
@Backing(type="int") @VintfStability
enum EvsBandwidth {
NONE = 0,
- NARROW_BAND = (1 << 0),
- WIDE_BAND = (1 << 1),
- SUPER_WIDE_BAND = (1 << 2),
- FULL_BAND = (1 << 3),
+ NARROW_BAND = (1 << 0) /* 1 */,
+ WIDE_BAND = (1 << 1) /* 2 */,
+ SUPER_WIDE_BAND = (1 << 2) /* 4 */,
+ FULL_BAND = (1 << 3) /* 8 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
index a530a8d..fb1f14d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
@@ -34,25 +34,25 @@
package android.hardware.radio.ims.media;
@Backing(type="int") @VintfStability
enum EvsMode {
- EVS_MODE_0 = (1 << 0),
- EVS_MODE_1 = (1 << 1),
- EVS_MODE_2 = (1 << 2),
- EVS_MODE_3 = (1 << 3),
- EVS_MODE_4 = (1 << 4),
- EVS_MODE_5 = (1 << 5),
- EVS_MODE_6 = (1 << 6),
- EVS_MODE_7 = (1 << 7),
- EVS_MODE_8 = (1 << 8),
- EVS_MODE_9 = (1 << 9),
- EVS_MODE_10 = (1 << 10),
- EVS_MODE_11 = (1 << 11),
- EVS_MODE_12 = (1 << 12),
- EVS_MODE_13 = (1 << 13),
- EVS_MODE_14 = (1 << 14),
- EVS_MODE_15 = (1 << 15),
- EVS_MODE_16 = (1 << 16),
- EVS_MODE_17 = (1 << 17),
- EVS_MODE_18 = (1 << 18),
- EVS_MODE_19 = (1 << 19),
- EVS_MODE_20 = (1 << 20),
+ EVS_MODE_0 = (1 << 0) /* 1 */,
+ EVS_MODE_1 = (1 << 1) /* 2 */,
+ EVS_MODE_2 = (1 << 2) /* 4 */,
+ EVS_MODE_3 = (1 << 3) /* 8 */,
+ EVS_MODE_4 = (1 << 4) /* 16 */,
+ EVS_MODE_5 = (1 << 5) /* 32 */,
+ EVS_MODE_6 = (1 << 6) /* 64 */,
+ EVS_MODE_7 = (1 << 7) /* 128 */,
+ EVS_MODE_8 = (1 << 8) /* 256 */,
+ EVS_MODE_9 = (1 << 9) /* 512 */,
+ EVS_MODE_10 = (1 << 10) /* 1024 */,
+ EVS_MODE_11 = (1 << 11) /* 2048 */,
+ EVS_MODE_12 = (1 << 12) /* 4096 */,
+ EVS_MODE_13 = (1 << 13) /* 8192 */,
+ EVS_MODE_14 = (1 << 14) /* 16384 */,
+ EVS_MODE_15 = (1 << 15) /* 32768 */,
+ EVS_MODE_16 = (1 << 16) /* 65536 */,
+ EVS_MODE_17 = (1 << 17) /* 131072 */,
+ EVS_MODE_18 = (1 << 18) /* 262144 */,
+ EVS_MODE_19 = (1 << 19) /* 524288 */,
+ EVS_MODE_20 = (1 << 20) /* 1048576 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl
index d90b2a4..0e9eaee 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl
@@ -35,8 +35,8 @@
@Backing(type="int") @VintfStability
enum MediaDirection {
NO_FLOW = 0,
- SEND_ONLY = 1,
- RECEIVE_ONLY = 2,
- SEND_RECEIVE = 3,
- INACTIVE = 4,
+ RTP_TX = (1 << 0) /* 1 */,
+ RTP_RX = (1 << 1) /* 2 */,
+ RTCP_TX = (1 << 2) /* 4 */,
+ RTCP_RX = (1 << 3) /* 8 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
index 0663754..289c810 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
@@ -35,11 +35,11 @@
@Backing(type="int") @VintfStability
enum RtcpXrReportBlockType {
RTCPXR_NONE = 0,
- RTCPXR_LOSS_RLE_REPORT_BLOCK = (1 << 0),
- RTCPXR_DUPLICATE_RLE_REPORT_BLOCK = (1 << 1),
- RTCPXR_PACKET_RECEIPT_TIMES_REPORT_BLOCK = (1 << 2),
- RTCPXR_RECEIVER_REFERENCE_TIME_REPORT_BLOCK = (1 << 3),
- RTCPXR_DLRR_REPORT_BLOCK = (1 << 4),
- RTCPXR_STATISTICS_SUMMARY_REPORT_BLOCK = (1 << 5),
- RTCPXR_VOIP_METRICS_REPORT_BLOCK = (1 << 6),
+ RTCPXR_LOSS_RLE_REPORT_BLOCK = (1 << 0) /* 1 */,
+ RTCPXR_DUPLICATE_RLE_REPORT_BLOCK = (1 << 1) /* 2 */,
+ RTCPXR_PACKET_RECEIPT_TIMES_REPORT_BLOCK = (1 << 2) /* 4 */,
+ RTCPXR_RECEIVER_REFERENCE_TIME_REPORT_BLOCK = (1 << 3) /* 8 */,
+ RTCPXR_DLRR_REPORT_BLOCK = (1 << 4) /* 16 */,
+ RTCPXR_STATISTICS_SUMMARY_REPORT_BLOCK = (1 << 5) /* 32 */,
+ RTCPXR_VOIP_METRICS_REPORT_BLOCK = (1 << 6) /* 64 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
index 1a8921e..8a826f6 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -34,7 +34,7 @@
package android.hardware.radio.ims.media;
@VintfStability
parcelable RtpConfig {
- android.hardware.radio.ims.media.MediaDirection direction;
+ int direction;
android.hardware.radio.AccessNetwork accessNetwork;
android.hardware.radio.ims.media.RtpAddress remoteAddress;
android.hardware.radio.ims.media.RtpSessionParams sessionParams;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatellite.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatellite.aidl
deleted file mode 100644
index a00e4f5..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatellite.aidl
+++ /dev/null
@@ -1,53 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@VintfStability
-interface IRadioSatellite {
- oneway void addAllowedSatelliteContacts(in int serial, in String[] contacts);
- oneway void getCapabilities(in int serial);
- oneway void getMaxCharactersPerTextMessage(in int serial);
- oneway void getPendingMessages(in int serial);
- oneway void getPowerState(in int serial);
- oneway void getSatelliteMode(in int serial);
- oneway void getTimeForNextSatelliteVisibility(in int serial);
- oneway void provisionService(in int serial, in String imei, in String msisdn, in String imsi, in android.hardware.radio.satellite.SatelliteFeature[] features);
- oneway void removeAllowedSatelliteContacts(in int serial, in String[] contacts);
- oneway void responseAcknowledgement();
- oneway void sendMessages(in int serial, in String[] messages, in String destination, in double latitude, in double longitude);
- oneway void setIndicationFilter(in int serial, in int filterBitmask);
- oneway void setPower(in int serial, in boolean on);
- oneway void setResponseFunctions(in android.hardware.radio.satellite.IRadioSatelliteResponse satelliteResponse, in android.hardware.radio.satellite.IRadioSatelliteIndication satelliteIndication);
- oneway void startSendingSatellitePointingInfo(in int serial);
- oneway void stopSendingSatellitePointingInfo(in int serial);
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
deleted file mode 100644
index 6a03f26..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
+++ /dev/null
@@ -1,44 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@VintfStability
-interface IRadioSatelliteIndication {
- oneway void onMessagesTransferComplete(in android.hardware.radio.RadioIndicationType type, in boolean complete);
- oneway void onNewMessages(in android.hardware.radio.RadioIndicationType type, in String[] messages);
- oneway void onPendingMessageCount(in android.hardware.radio.RadioIndicationType type, in int count);
- oneway void onProvisionStateChanged(in android.hardware.radio.RadioIndicationType type, boolean provisioned, in android.hardware.radio.satellite.SatelliteFeature[] features);
- oneway void onSatelliteModeChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.SatelliteMode mode);
- oneway void onSatellitePointingInfoChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.PointingInfo pointingInfo);
- oneway void onSatelliteRadioTechnologyChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.NTRadioTechnology technology);
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
deleted file mode 100644
index f6614b1..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
+++ /dev/null
@@ -1,52 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@VintfStability
-interface IRadioSatelliteResponse {
- oneway void acknowledgeRequest(in int serial);
- oneway void addAllowedSatelliteContactsResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void getCapabilitiesResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.satellite.SatelliteCapabilities capabilities);
- oneway void getMaxCharactersPerTextMessageResponse(in android.hardware.radio.RadioResponseInfo info, in int charLimit);
- oneway void getPendingMessagesResponse(in android.hardware.radio.RadioResponseInfo info, in String[] messages);
- oneway void getPowerStateResponse(in android.hardware.radio.RadioResponseInfo info, in boolean on);
- oneway void getSatelliteModeResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.satellite.SatelliteMode mode, in android.hardware.radio.satellite.NTRadioTechnology technology);
- oneway void getTimeForNextSatelliteVisibilityResponse(in android.hardware.radio.RadioResponseInfo info, in int timeInSeconds);
- oneway void provisionServiceResponse(in android.hardware.radio.RadioResponseInfo info, in boolean provisioned);
- oneway void removeAllowedSatelliteContactsResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void sendMessagesResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void setIndicationFilterResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void setPowerResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void startSendingSatellitePointingInfoResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void stopSendingSatellitePointingInfoResponse(in android.hardware.radio.RadioResponseInfo info);
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IndicationFilter.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IndicationFilter.aidl
deleted file mode 100644
index 5aa5739..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IndicationFilter.aidl
+++ /dev/null
@@ -1,39 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
-enum IndicationFilter {
- NONE = 0,
- SATELLITE_MODE = 1,
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/NTRadioTechnology.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/NTRadioTechnology.aidl
deleted file mode 100644
index 29de55f..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/NTRadioTechnology.aidl
+++ /dev/null
@@ -1,41 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
-enum NTRadioTechnology {
- NB_IOT_NTN = 0,
- NR_NTN = 1,
- EMTC_NTN = 2,
- PROPRIETARY = 3,
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/PointingInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/PointingInfo.aidl
deleted file mode 100644
index dcfce34..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/PointingInfo.aidl
+++ /dev/null
@@ -1,42 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@JavaDerive(toString=true) @VintfStability
-parcelable PointingInfo {
- float satelliteAzimuthDegrees;
- float satelliteElevationDegrees;
- float antennaAzimuthDegrees;
- float antennaPitchDegrees;
- float antennaRollDegrees;
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteCapabilities.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteCapabilities.aidl
deleted file mode 100644
index 407a9d1..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteCapabilities.aidl
+++ /dev/null
@@ -1,42 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@JavaDerive(toString=true) @VintfStability
-parcelable SatelliteCapabilities {
- android.hardware.radio.satellite.NTRadioTechnology[] supportedRadioTechnologies;
- boolean isAlwaysOn;
- boolean needsPointingToSatellite;
- android.hardware.radio.satellite.SatelliteFeature[] supportedFeatures;
- boolean needsSeparateSimProfile;
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteMode.aidl
deleted file mode 100644
index 1cf6a2c..0000000
--- a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteMode.aidl
+++ /dev/null
@@ -1,42 +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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.radio.satellite;
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
-enum SatelliteMode {
- POWERED_OFF = 0,
- OUT_OF_SERVICE_NOT_SEARCHING = 1,
- OUT_OF_SERVICE_SEARCHING = 2,
- ACQUIRED = 3,
- MESSAGE_TRANSFERRING = 4,
-}
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
index aa55cd7..b7b074b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
@@ -34,28 +34,28 @@
package android.hardware.radio;
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioAccessFamily {
- UNKNOWN = (1 << android.hardware.radio.RadioTechnology.UNKNOWN),
- GPRS = (1 << android.hardware.radio.RadioTechnology.GPRS),
- EDGE = (1 << android.hardware.radio.RadioTechnology.EDGE),
- UMTS = (1 << android.hardware.radio.RadioTechnology.UMTS),
- IS95A = (1 << android.hardware.radio.RadioTechnology.IS95A),
- IS95B = (1 << android.hardware.radio.RadioTechnology.IS95B),
- ONE_X_RTT = (1 << android.hardware.radio.RadioTechnology.ONE_X_RTT),
- EVDO_0 = (1 << android.hardware.radio.RadioTechnology.EVDO_0),
- EVDO_A = (1 << android.hardware.radio.RadioTechnology.EVDO_A),
- HSDPA = (1 << android.hardware.radio.RadioTechnology.HSDPA),
- HSUPA = (1 << android.hardware.radio.RadioTechnology.HSUPA),
- HSPA = (1 << android.hardware.radio.RadioTechnology.HSPA),
- EVDO_B = (1 << android.hardware.radio.RadioTechnology.EVDO_B),
- EHRPD = (1 << android.hardware.radio.RadioTechnology.EHRPD),
- LTE = (1 << android.hardware.radio.RadioTechnology.LTE),
- HSPAP = (1 << android.hardware.radio.RadioTechnology.HSPAP),
- GSM = (1 << android.hardware.radio.RadioTechnology.GSM),
- TD_SCDMA = (1 << android.hardware.radio.RadioTechnology.TD_SCDMA),
- IWLAN = (1 << android.hardware.radio.RadioTechnology.IWLAN),
+ UNKNOWN = (1 << android.hardware.radio.RadioTechnology.UNKNOWN) /* 1 */,
+ GPRS = (1 << android.hardware.radio.RadioTechnology.GPRS) /* 2 */,
+ EDGE = (1 << android.hardware.radio.RadioTechnology.EDGE) /* 4 */,
+ UMTS = (1 << android.hardware.radio.RadioTechnology.UMTS) /* 8 */,
+ IS95A = (1 << android.hardware.radio.RadioTechnology.IS95A) /* 16 */,
+ IS95B = (1 << android.hardware.radio.RadioTechnology.IS95B) /* 32 */,
+ ONE_X_RTT = (1 << android.hardware.radio.RadioTechnology.ONE_X_RTT) /* 64 */,
+ EVDO_0 = (1 << android.hardware.radio.RadioTechnology.EVDO_0) /* 128 */,
+ EVDO_A = (1 << android.hardware.radio.RadioTechnology.EVDO_A) /* 256 */,
+ HSDPA = (1 << android.hardware.radio.RadioTechnology.HSDPA) /* 512 */,
+ HSUPA = (1 << android.hardware.radio.RadioTechnology.HSUPA) /* 1024 */,
+ HSPA = (1 << android.hardware.radio.RadioTechnology.HSPA) /* 2048 */,
+ EVDO_B = (1 << android.hardware.radio.RadioTechnology.EVDO_B) /* 4096 */,
+ EHRPD = (1 << android.hardware.radio.RadioTechnology.EHRPD) /* 8192 */,
+ LTE = (1 << android.hardware.radio.RadioTechnology.LTE) /* 16384 */,
+ HSPAP = (1 << android.hardware.radio.RadioTechnology.HSPAP) /* 32768 */,
+ GSM = (1 << android.hardware.radio.RadioTechnology.GSM) /* 65536 */,
+ TD_SCDMA = (1 << android.hardware.radio.RadioTechnology.TD_SCDMA) /* 131072 */,
+ IWLAN = (1 << android.hardware.radio.RadioTechnology.IWLAN) /* 262144 */,
/**
* @deprecated use LTE instead.
*/
- LTE_CA = (1 << android.hardware.radio.RadioTechnology.LTE_CA),
- NR = (1 << android.hardware.radio.RadioTechnology.NR),
+ LTE_CA = (1 << android.hardware.radio.RadioTechnology.LTE_CA) /* 524288 */,
+ NR = (1 << android.hardware.radio.RadioTechnology.NR) /* 1048576 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
index 448c0bb..9785825 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
@@ -37,5 +37,5 @@
const int MAX_RILDS = 3;
const int MAX_UUID_LENGTH = 64;
const int CARD_MAX_APPS = 8;
- const int P2_CONSTANT_NO_P2 = (-1);
+ const int P2_CONSTANT_NO_P2 = (-1) /* -1 */;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
index b9db56c..98606e5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
@@ -123,15 +123,4 @@
BLOCKED_DUE_TO_CALL = 69,
RF_HARDWARE_ISSUE = 70,
NO_RF_CALIBRATION_INFO = 71,
- ENCODING_NOT_SUPPORTED = 72,
- FEATURE_NOT_SUPPORTED = 73,
- INVALID_CONTACT = 74,
- MODEM_INCOMPATIBLE = 75,
- NETWORK_TIMEOUT = 76,
- NO_SATELLITE_SIGNAL = 77,
- NOT_SUFFICIENT_ACCOUNT_BALANCE = 78,
- RADIO_TECHNOLOGY_NOT_SUPPORTED = 79,
- SUBSCRIBER_NOT_AUTHORIZED = 80,
- SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL = 81,
- UNIDENTIFIED_SUBSCRIBER = 82,
}
diff --git a/radio/aidl/android/hardware/radio/RadioError.aidl b/radio/aidl/android/hardware/radio/RadioError.aidl
index 4d44559..2031399 100644
--- a/radio/aidl/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/android/hardware/radio/RadioError.aidl
@@ -301,51 +301,4 @@
* Unlike RF_HARDWARE_ISSUE, this is a SW problem and no HW repair is needed.
*/
NO_RF_CALIBRATION_INFO = 71,
- /**
- * The encoding scheme is not supported by either the network or the MS.
- */
- ENCODING_NOT_SUPPORTED = 72,
- /**
- * The requesting feature is not supported by the service provider/operator.
- */
- FEATURE_NOT_SUPPORTED = 73,
- /**
- * The contact to be added is either not existing or not valid.
- */
- INVALID_CONTACT = 74,
- /**
- * The modem of the MS is not compatible with the service provider/operator. This generic error
- * should be used only when there are some mimatches in the capabilities between the MS and
- * the operator and the error cannot be mapped properly to other specific network errors.
- */
- MODEM_INCOMPATIBLE = 75,
- /**
- * Modem timeout to receive ACK or response from network after sending a request to the network.
- */
- NETWORK_TIMEOUT = 76,
- /**
- * Modem fails to communicate with the satellite network since there is no satellite signal.
- */
- NO_SATELLITE_SIGNAL = 77,
- /**
- * The request cannot be performed since the subscriber's account balance is not sufficient.
- */
- NOT_SUFFICIENT_ACCOUNT_BALANCE = 78,
- /**
- * The radio technology is not supported by the service provider/operator.
- */
- RADIO_TECHNOLOGY_NOT_SUPPORTED = 79,
- /**
- * The subscription is not authorized to register with the service provider/operator.
- */
- SUBSCRIBER_NOT_AUTHORIZED = 80,
- /**
- * While processing a request from the Framework, the satellite modem detects terrestrial
- * signal, aborts the request, and switches to the terrestrial network.
- */
- SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL = 81,
- /**
- * The subscriber is not registered in the service provider.
- */
- UNIDENTIFIED_SUBSCRIBER = 82
}
diff --git a/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl b/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl
index 9f04d8e..e5c34c7 100644
--- a/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl
@@ -16,6 +16,17 @@
package android.hardware.radio.ims.media;
+/**
+ * Directions can be combined to meet various media direction
+ * requirements depending on the scenario.
+ *
+ * Examples:
+ * No Flow : NO_FLOW - eg. SRVCC.
+ * RTCP-only : RTCP_TX | RTCP_RX - eg. Local Hold or Dual Hold.
+ * Receive-Only : RTP_RX | RTCP_TX | RTCP_RX - eg. Remote Hold.
+ * Send-Receive : RTP_TX | RTP_RX | RTCP_TX | RTCP_RX - eg. Active call.
+ * Send-Only : RTP_TX | RTCP_TX | RTCP_RX - eg. Simplex call, voice mail, etc
+ */
@VintfStability
@Backing(type="int")
enum MediaDirection {
@@ -24,12 +35,16 @@
* may release the audio resource. Eg. SRVCC.
*/
NO_FLOW = 0,
- /** Device sends outgoing RTP and drops incoming RTP */
- SEND_ONLY = 1,
- /** Device receives the downlink RTP and does not transmit any uplink RTP */
- RECEIVE_ONLY = 2,
- /** Device sends and receive RTP in both directions */
- SEND_RECEIVE = 3,
- /** No RTP flow however RTCP continues to flow. Eg. HOLD */
- INACTIVE = 4,
+
+ /** Send RTP packets */
+ RTP_TX = 1 << 0,
+
+ /** Receive and processes RTP packets */
+ RTP_RX = 1 << 1,
+
+ /** Send RTCP packets */
+ RTCP_TX = 1 << 2,
+
+ /** Receive RTCP packets */
+ RTCP_RX = 1 << 3,
}
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
index f6696f7..f93b112 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -18,15 +18,14 @@
import android.hardware.radio.AccessNetwork;
import android.hardware.radio.ims.media.AnbrMode;
-import android.hardware.radio.ims.media.MediaDirection;
import android.hardware.radio.ims.media.RtcpConfig;
import android.hardware.radio.ims.media.RtpAddress;
import android.hardware.radio.ims.media.RtpSessionParams;
@VintfStability
parcelable RtpConfig {
- /** Media flow direction */
- MediaDirection direction;
+ /** Media flow direction. The bitfield of MediaDirection(s) */
+ int direction;
/** Radio Access Network */
AccessNetwork accessNetwork;
/** IP address and port number of the other party for RTP media */
diff --git a/radio/aidl/android/hardware/radio/satellite/IRadioSatellite.aidl b/radio/aidl/android/hardware/radio/satellite/IRadioSatellite.aidl
deleted file mode 100644
index 87f13a6..0000000
--- a/radio/aidl/android/hardware/radio/satellite/IRadioSatellite.aidl
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-import android.hardware.radio.satellite.IRadioSatelliteIndication;
-import android.hardware.radio.satellite.IRadioSatelliteResponse;
-import android.hardware.radio.satellite.IndicationFilter;
-import android.hardware.radio.satellite.SatelliteFeature;
-
-/**
- * This interface is used by telephony to send commands to and query info from satellite modem.
- * All the functions have minimum one parameter:
- * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
- * duration of a method call. If clients provide colliding serials (including passing the same
- * serial to different methods), multiple responses (one for each method call) must still be served.
- */
-@VintfStability
-oneway interface IRadioSatellite {
- /**
- * Add contacts that are allowed to be used for satellite communication. This is applicable for
- * incoming messages as well.
- *
- * @param serial Serial number of request.
- * @param contacts List of allowed contacts to be added.
- */
- void addAllowedSatelliteContacts(in int serial, in String[] contacts);
-
- /**
- * Get feature capabilities supported by satellite.
- *
- * @param serial Serial number of request.
- */
- void getCapabilities(in int serial);
-
- /**
- * Get max number of characters per text message.
- *
- * @param serial Serial number of request.
- */
- void getMaxCharactersPerTextMessage(in int serial);
-
- /**
- * Get pending messages.
- *
- * @param serial Serial number of request.
- */
- void getPendingMessages(in int serial);
-
- /**
- * Get satellite modem state.
- *
- * @param serial Serial number of request.
- */
- void getPowerState(in int serial);
-
- /**
- * Get current satellite registration mode, which is defined in {@link #SatelliteMode}.
- *
- * @param serial Serial number of request.
- */
- void getSatelliteMode(in int serial);
-
- /**
- * Get time for next visibility of satellite.
- *
- * @param serial Serial number of request.
- */
- void getTimeForNextSatelliteVisibility(in int serial);
-
- /**
- * Provision the subscription with a satellite provider. This is needed to register the
- * subscription if the provider allows dynamic registration.
- *
- * @param serial Serial number of request.
- * @param imei IMEI of the SIM associated with the satellite modem.
- * @param msisdn MSISDN of the SIM associated with the satellite modem.
- * @param imsi IMSI of the SIM associated with the satellite modem.
- * @param features List of features to be provisioned.
- */
- void provisionService(in int serial, in String imei, in String msisdn, in String imsi,
- in SatelliteFeature[] features);
-
- /**
- * Remove contacts that are allowed to be used for satellite communication. This is applicable
- * for incoming messages as well.
- *
- * @param serial Serial number of request.
- * @param contacts List of allowed contacts to be removed.
- */
- void removeAllowedSatelliteContacts(in int serial, in String[] contacts);
-
- /**
- * When response type received from a radio indication or radio response is
- * RadioIndicationType:UNSOLICITED_ACK_EXP or RadioResponseType:SOLICITED_ACK_EXP respectively,
- * acknowledge the receipt of those messages by sending responseAcknowledgement().
- */
- void responseAcknowledgement();
-
- /**
- * Send text messages.
- *
- * @param serial Serial number of request.
- * @param messages List of messages in text format to be sent.
- * @param destination The recipient of the message.
- * @param latitude The current latitude of the device.
- * @param longitude The current longitude of the device. The location (i.e., latitude and
- * longitude) of the device will be filled for emergency messages.
- */
- void sendMessages(in int serial, in String[] messages, in String destination,
- in double latitude, in double longitude);
-
- /**
- * Set the filter for what type of indication framework want to receive from modem.
- *
- * @param serial Serial number of request.
- * @param filterBitmask The filter bitmask identifying what type of indication Telephony
- * framework wants to receive from modem. This bitmask is the 'or'
- * combination of the enum values defined in {@link #IndicationFilter}.
- */
- void setIndicationFilter(in int serial, in int filterBitmask);
-
- /**
- * Turn satellite modem on/off.
- *
- * @param serial Serial number of request.
- * @param on True for turning on.
- * False for turning off.
- */
- void setPower(in int serial, in boolean on);
-
- /**
- * Set response functions for Satellite requests and indications.
- *
- * @param satelliteResponse Object containing response functions
- * @param satelliteIndication Object containing radio indications
- */
- void setResponseFunctions(in IRadioSatelliteResponse satelliteResponse,
- in IRadioSatelliteIndication satelliteIndication);
-
- /**
- * User started pointing to the satellite. Modem should continue to update the pointing input
- * as user device/satellite moves.
- *
- * @param serial Serial number of request.
- */
- void startSendingSatellitePointingInfo(in int serial);
-
- /**
- * Stop sending satellite pointing info to the framework.
- *
- * @param serial Serial number of request.
- */
- void stopSendingSatellitePointingInfo(in int serial);
-}
diff --git a/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl b/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
deleted file mode 100644
index f1d9747..0000000
--- a/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-import android.hardware.radio.RadioIndicationType;
-import android.hardware.radio.satellite.NTRadioTechnology;
-import android.hardware.radio.satellite.PointingInfo;
-import android.hardware.radio.satellite.SatelliteFeature;
-import android.hardware.radio.satellite.SatelliteMode;
-
-/**
- * Interface declaring unsolicited radio indications for satellite APIs.
- */
-@VintfStability
-oneway interface IRadioSatelliteIndication {
- /**
- * Confirms that ongoing message transfer is complete.
- *
- * @param type Type of radio indication
- * @param complete True mean the transfer is complete.
- * False means the transfer is not complete.
- */
- void onMessagesTransferComplete(in RadioIndicationType type, in boolean complete);
-
- /**
- * Indicates new message received on device.
- *
- * @param type Type of radio indication
- * @param messages List of new messages received.
- */
- void onNewMessages(in RadioIndicationType type, in String[] messages);
-
- /**
- * Indicates that satellite has pending messages for the device to be pulled.
- *
- * @param type Type of radio indication
- * @param count Number of pending messages.
- */
- void onPendingMessageCount(in RadioIndicationType type, in int count);
-
- /**
- * Indicate that satellite provision state has changed.
- *
- * @param type Type of radio indication
- * @param provisioned True means the service is provisioned.
- * False means the service is not provisioned.
- * @param features List of Feature whose provision state has changed.
- */
- void onProvisionStateChanged(
- in RadioIndicationType type, boolean provisioned, in SatelliteFeature[] features);
-
- /**
- * Indicate that satellite mode has changed.
- *
- * @param type Type of radio indication
- * @param mode The current mode of the satellite modem.
- */
- void onSatelliteModeChanged(in RadioIndicationType type, in SatelliteMode mode);
-
- /**
- * Indicate that satellite Pointing input has changed.
- *
- * @param type Type of radio indication
- * @param pointingInfo The current pointing info.
- */
- void onSatellitePointingInfoChanged(in RadioIndicationType type, in PointingInfo pointingInfo);
-
- /**
- * Indicate that satellite radio technology has changed.
- *
- * @param type Type of radio indication
- * @param technology The current technology of the satellite modem.
- */
- void onSatelliteRadioTechnologyChanged(
- in RadioIndicationType type, in NTRadioTechnology technology);
-}
diff --git a/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl b/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
deleted file mode 100644
index e81edaa..0000000
--- a/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-import android.hardware.radio.RadioResponseInfo;
-import android.hardware.radio.satellite.NTRadioTechnology;
-import android.hardware.radio.satellite.SatelliteCapabilities;
-import android.hardware.radio.satellite.SatelliteMode;
-
-/**
- * Interface declaring response functions to solicited radio requests for satellite APIs.
- */
-@VintfStability
-oneway interface IRadioSatelliteResponse {
- /**
- * Acknowledge the receipt of radio request sent to the vendor. This must be sent only for
- * radio request which take long time to respond. For more details, refer
- * https://source.android.com/devices/tech/connect/ril.html
- *
- * @param serial Serial no. of the request whose acknowledgement is sent.
- */
- void acknowledgeRequest(in int serial);
-
- /**
- * Response of the request addAllowedSatelliteContacts.
- *
- * @param info Response info struct containing serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:ABORTED
- * RadioError:ACCESS_BARRED
- * RadioError:CANCELLED
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_CONTACT
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NETWORK_ERR
- * RadioError:NETWORK_NOT_READY
- * RadioError:NETWORK_REJECT
- * RadioError:NETWORK_TIMEOUT
- * RadioError:NO_MEMORY
- * RadioError:NO_NETWORK_FOUND
- * RadioError:NO_RESOURCES
- * RadioError:NO_SATELLITE_SIGNAL
- * RadioError:NO_SUBSCRIPTION
- * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
- * RadioError:OPERATION_NOT_ALLOWED
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SIM_ABSENT
- * RadioError:SIM_BUSY
- * RadioError:SIM_ERR
- * RadioError:SIM_FULL
- * RadioError:SYSTEM_ERR
- * RadioError:UNIDENTIFIED_SUBSCRIBER
- */
- void addAllowedSatelliteContactsResponse(in RadioResponseInfo info);
-
- /**
- * Response of the request getCapabilities.
- *
- * @param info Response info struct containing serial no. and error
- * @param capabilities List of capabilities that the satellite modem supports.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void getCapabilitiesResponse(in RadioResponseInfo info, in SatelliteCapabilities capabilities);
-
- /**
- * Response of the request getMaxCharactersPerTextMessage.
- *
- * @param info Response info struct containing serial no. and error
- * @param charLimit Maximum number of characters in a text message that can be sent.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void getMaxCharactersPerTextMessageResponse(in RadioResponseInfo info, in int charLimit);
-
- /**
- * Response of the request getPendingMessages.
- *
- * @param info Response info struct containing serial no. and error
- * @param messages List of pending messages received.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:ABORTED
- * RadioError:ACCESS_BARRED
- * RadioError:BLOCKED_DUE_TO_CALL
- * RadioError:CANCELLED
- * RadioError:ENCODING_ERR
- * RadioError:ENCODING_NOT_SUPPORTED
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_SMS_FORMAT
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NETWORK_ERR
- * RadioError:NETWORK_NOT_READY
- * RadioError:NETWORK_REJECT
- * RadioError:NETWORK_TIMEOUT
- * RadioError:NO_MEMORY
- * RadioError:NO_NETWORK_FOUND
- * RadioError:NO_RESOURCES
- * RadioError:NO_SMS_TO_ACK
- * RadioError:NO_SATELLITE_SIGNAL
- * RadioError:NO_SUBSCRIPTION
- * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
- * RadioError:OPERATION_NOT_ALLOWED
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SIM_ABSENT
- * RadioError:SIM_BUSY
- * RadioError:SIM_ERR
- * RadioError:SIM_FULL
- * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
- * RadioError:SYSTEM_ERR
- * RadioError:SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL
- */
- void getPendingMessagesResponse(in RadioResponseInfo info, in String[] messages);
-
- /**
- * Response of the request getPowerSate.
- *
- * @param info Response info struct containing serial no. and error
- * @param on True means the modem is ON.
- * False means the modem is OFF.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void getPowerStateResponse(in RadioResponseInfo info, in boolean on);
-
- /**
- * Response of the request getSatelliteMode.
- *
- * @param info Response info struct containing serial no. and error
- * @param mode Current Mode of the satellite modem.
- * @param technology The current technology of the satellite modem.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void getSatelliteModeResponse(
- in RadioResponseInfo info, in SatelliteMode mode, in NTRadioTechnology technology);
-
- /**
- * Response of the request getTimeForNextSatelliteVisibility.
- *
- * @param info Response info struct containing serial no. and error
- * @param timeInSeconds The duration in seconds after which the satellite will be visible.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void getTimeForNextSatelliteVisibilityResponse(in RadioResponseInfo info, in int timeInSeconds);
-
- /**
- * Response of the request provisionService.
- *
- * @param info Response info struct containing serial no. and error
- * @param provisioned True means the service is provisioned.
- * False means the service is not provisioned.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:ABORTED
- * RadioError:ACCESS_BARRED
- * RadioError:CANCELLED
- * RadioError:FEATURE_NOT_SUPPORTED
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:MODEM_INCOMPATIBLE
- * RadioError:NETWORK_ERR
- * RadioError:NETWORK_NOT_READY
- * RadioError:NETWORK_REJECT
- * RadioError:NETWORK_TIMEOUT
- * RadioError:NO_MEMORY
- * RadioError:NO_NETWORK_FOUND
- * RadioError:NO_RESOURCES
- * RadioError:NO_SATELLITE_SIGNAL
- * RadioError:NO_SUBSCRIPTION
- * RadioError:OPERATION_NOT_ALLOWED
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:RADIO_TECHNOLOGY_NOT_SUPPORTED
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SIM_ABSENT
- * RadioError:SIM_BUSY
- * RadioError:SIM_ERR
- * RadioError:SIM_FULL
- * RadioError:SUBSCRIBER_NOT_AUTHORIZED
- * RadioError:SYSTEM_ERR
- */
- void provisionServiceResponse(in RadioResponseInfo info, in boolean provisioned);
-
- /**
- * Response of the request removeAllowedSatelliteContacts.
- *
- * @param info Response info struct containing serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:ABORTED
- * RadioError:ACCESS_BARRED
- * RadioError:CANCELLED
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_CONTACT
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NETWORK_ERR
- * RadioError:NETWORK_NOT_READY
- * RadioError:NETWORK_REJECT
- * RadioError:NETWORK_TIMEOUT
- * RadioError:NO_MEMORY
- * RadioError:NO_NETWORK_FOUND
- * RadioError:NO_RESOURCES
- * RadioError:NO_SATELLITE_SIGNAL
- * RadioError:NO_SUBSCRIPTION
- * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
- * RadioError:OPERATION_NOT_ALLOWED
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SIM_ABSENT
- * RadioError:SIM_BUSY
- * RadioError:SIM_ERR
- * RadioError:SIM_FULL
- * RadioError:SYSTEM_ERR
- * RadioError:UNIDENTIFIED_SUBSCRIBER
- */
- void removeAllowedSatelliteContactsResponse(in RadioResponseInfo info);
-
- /**
- * Response of the request sendMessages.
- *
- * @param info Response info struct containing serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:ABORTED
- * RadioError:ACCESS_BARRED
- * RadioError:BLOCKED_DUE_TO_CALL
- * RadioError:CANCELLED
- * RadioError:ENCODING_ERR
- * RadioError:ENCODING_NOT_SUPPORTED
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_SMS_FORMAT
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NETWORK_ERR
- * RadioError:NETWORK_NOT_READY
- * RadioError:NETWORK_REJECT
- * RadioError:NETWORK_TIMEOUT
- * RadioError:NO_MEMORY
- * RadioError:NO_NETWORK_FOUND
- * RadioError:NO_RESOURCES
- * RadioError:NO_SMS_TO_ACK
- * RadioError:NO_SATELLITE_SIGNAL
- * RadioError:NO_SUBSCRIPTION
- * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
- * RadioError:OPERATION_NOT_ALLOWED
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SIM_ABSENT
- * RadioError:SIM_BUSY
- * RadioError:SIM_ERR
- * RadioError:SIM_FULL
- * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
- * RadioError:SMS_SEND_FAIL_RETRY
- * RadioError:SYSTEM_ERR
- * RadioError:SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL
- * RadioError:UNIDENTIFIED_SUBSCRIBER
- */
- void sendMessagesResponse(in RadioResponseInfo info);
-
- /**
- * Response of the request setIndicationFilter.
- *
- * @param info Response info struct containing serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void setIndicationFilterResponse(in RadioResponseInfo info);
-
- /**
- * Response of the request setPower.
- *
- * @param info Response info struct containing serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:NO_RF_CALIBRATION_INFO
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:RF_HARDWARE_ISSUE
- * RadioError:SYSTEM_ERR
- */
- void setPowerResponse(in RadioResponseInfo info);
-
- /**
- * Response of the request startSendingSatellitePointingInfo.
- *
- * @param info Response info struct containing serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void startSendingSatellitePointingInfoResponse(in RadioResponseInfo info);
-
- /**
- * Response of the request stopSendingSatellitePointingInfo.
- *
- * @param info Response info struct containing serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- * RadioError:INVALID_MODEM_STATE
- * RadioError:INVALID_SIM_STATE
- * RadioError:INVALID_STATE
- * RadioError:MODEM_ERR
- * RadioError:NO_MEMORY
- * RadioError:NO_RESOURCES
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:REQUEST_RATE_LIMITED
- * RadioError:SYSTEM_ERR
- */
- void stopSendingSatellitePointingInfoResponse(in RadioResponseInfo info);
-}
diff --git a/radio/aidl/android/hardware/radio/satellite/NTRadioTechnology.aidl b/radio/aidl/android/hardware/radio/satellite/NTRadioTechnology.aidl
deleted file mode 100644
index 39b2b00..0000000
--- a/radio/aidl/android/hardware/radio/satellite/NTRadioTechnology.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-@VintfStability
-@Backing(type="int")
-@JavaDerive(toString=true)
-enum NTRadioTechnology {
- /* 3GPP NB-IoT (Narrowband Internet of Things) over Non-Terrestrial-Networks technology */
- NB_IOT_NTN = 0,
- /* 3GPP 5G NR over Non-Terrestrial-Networks technology */
- NR_NTN = 1,
- /* 3GPP eMTC (enhanced Machine-Type Communication) over Non-Terrestrial-Networks technology */
- EMTC_NTN = 2,
- /* Proprietary technology like Iridium or Bullitt */
- PROPRIETARY = 3
-}
diff --git a/radio/aidl/android/hardware/radio/satellite/PointingInfo.aidl b/radio/aidl/android/hardware/radio/satellite/PointingInfo.aidl
deleted file mode 100644
index 8496a59..0000000
--- a/radio/aidl/android/hardware/radio/satellite/PointingInfo.aidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-@VintfStability
-@JavaDerive(toString=true)
-parcelable PointingInfo {
- /* Satellite azimuth in degrees */
- float satelliteAzimuthDegrees;
-
- /* Satellite elevation in degrees */
- float satelliteElevationDegrees;
-
- /* Antenna azimuth in degrees */
- float antennaAzimuthDegrees;
-
- /**
- * Angle of rotation about the x axis. This value represents the angle between a plane
- * parallel to the device's screen and a plane parallel to the ground.
- */
- float antennaPitchDegrees;
-
- /**
- * Angle of rotation about the y axis. This value represents the angle between a plane
- * perpendicular to the device's screen and a plane parallel to the ground.
- */
- float antennaRollDegrees;
-}
diff --git a/radio/aidl/android/hardware/radio/satellite/SatelliteCapabilities.aidl b/radio/aidl/android/hardware/radio/satellite/SatelliteCapabilities.aidl
deleted file mode 100644
index 01e64aa..0000000
--- a/radio/aidl/android/hardware/radio/satellite/SatelliteCapabilities.aidl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-import android.hardware.radio.satellite.NTRadioTechnology;
-import android.hardware.radio.satellite.SatelliteFeature;
-
-@VintfStability
-@JavaDerive(toString=true)
-parcelable SatelliteCapabilities {
- /**
- * List of technologies supported by the satellite modem.
- */
- NTRadioTechnology[] supportedRadioTechnologies;
-
- /**
- * Whether satellite mode is always on (this indicates the power impact of keeping it on is
- * very minimal).
- */
- boolean isAlwaysOn;
-
- /**
- * Whether UE needs to point to a satellite to send and receive data.
- */
- boolean needsPointingToSatellite;
-
- /**
- * List of features supported by the satellite modem.
- */
- SatelliteFeature[] supportedFeatures;
-
- /**
- * Whether UE needs a separate SIM profile to communicate with satellite network.
- */
- boolean needsSeparateSimProfile;
-}
diff --git a/radio/aidl/android/hardware/radio/satellite/SatelliteFeature.aidl b/radio/aidl/android/hardware/radio/satellite/SatelliteFeature.aidl
deleted file mode 100644
index 0e33998..0000000
--- a/radio/aidl/android/hardware/radio/satellite/SatelliteFeature.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-@VintfStability
-@Backing(type="int")
-@JavaDerive(toString=true)
-enum SatelliteFeature {
- /* Able to send and receive SMS messages to/from SOS numbers like call/service centers */
- SOS_SMS = 0,
- /* Able to send and receive SMS messages to/from emergency numbers like 911 */
- EMERGENCY_SMS = 1,
- /* Able to send and receive SMS messages to/from any allowed contacts */
- SMS = 2,
- /* Able to send device location to allowed contacts */
- LOCATION_SHARING = 3
-}
diff --git a/radio/aidl/android/hardware/radio/satellite/SatelliteMode.aidl b/radio/aidl/android/hardware/radio/satellite/SatelliteMode.aidl
deleted file mode 100644
index 349fd9e..0000000
--- a/radio/aidl/android/hardware/radio/satellite/SatelliteMode.aidl
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.satellite;
-
-@VintfStability
-@Backing(type="int")
-@JavaDerive(toString=true)
-enum SatelliteMode {
- /* Satellite modem is powered off */
- POWERED_OFF = 0,
- /* Satellite modem is in out of service state and not searching for satellite signal */
- OUT_OF_SERVICE_NOT_SEARCHING = 1,
- /* Satellite modem is in out of service state and searching for satellite signal */
- OUT_OF_SERVICE_SEARCHING = 2,
- /* Satellite modem has found satellite signal and gets connected to the satellite network */
- ACQUIRED = 3,
- /* Satellite modem is sending and/or receiving messages */
- MESSAGE_TRANSFERRING = 4
-}
diff --git a/radio/aidl/compat/libradiocompat/Android.bp b/radio/aidl/compat/libradiocompat/Android.bp
index 9aecf78..5cf1378 100644
--- a/radio/aidl/compat/libradiocompat/Android.bp
+++ b/radio/aidl/compat/libradiocompat/Android.bp
@@ -43,7 +43,6 @@
"android.hardware.radio.modem-V2-ndk",
"android.hardware.radio.network-V2-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.satellite-V1-ndk",
"android.hardware.radio.sim-V2-ndk",
"android.hardware.radio.voice-V2-ndk",
"android.hardware.radio@1.0",
@@ -94,9 +93,6 @@
"sap/Sap.cpp",
"sap/SapCallback.cpp",
"sap/structs.cpp",
- "satellite/RadioIndication-satellite.cpp",
- "satellite/RadioResponse-satellite.cpp",
- "satellite/RadioSatellite.cpp",
"sim/RadioIndication-sim.cpp",
"sim/RadioResponse-sim.cpp",
"sim/RadioSim.cpp",
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h
index ad9127e..f042456 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h
@@ -23,7 +23,6 @@
#include <aidl/android/hardware/radio/messaging/IRadioMessagingIndication.h>
#include <aidl/android/hardware/radio/modem/IRadioModemIndication.h>
#include <aidl/android/hardware/radio/network/IRadioNetworkIndication.h>
-#include <aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.h>
#include <aidl/android/hardware/radio/sim/IRadioSimIndication.h>
#include <aidl/android/hardware/radio/voice/IRadioVoiceIndication.h>
#include <android/hardware/radio/1.6/IRadioIndication.h>
@@ -61,10 +60,6 @@
::aidl::android::hardware::radio::ims::IRadioImsIndication,
::aidl::android::hardware::radio::ims::IRadioImsIndicationDefault, true>
mImsCb;
- GuaranteedCallback< //
- ::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication,
- ::aidl::android::hardware::radio::satellite::IRadioSatelliteIndicationDefault, true>
- mSatelliteCb;
// IRadioIndication @ 1.0
Return<void> radioStateChanged(V1_0::RadioIndicationType type,
@@ -232,9 +227,6 @@
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceIndication> voicCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication> imsCb);
- void setResponseFunction(
- std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>
- satelliteCb);
std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataIndication> dataCb();
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingIndication>
@@ -244,8 +236,6 @@
std::shared_ptr<::aidl::android::hardware::radio::sim::IRadioSimIndication> simCb();
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceIndication> voiceCb();
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication> imsCb();
- std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>
- satelliteCb();
};
} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h
index b976435..e20eed9 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h
@@ -24,7 +24,6 @@
#include <aidl/android/hardware/radio/messaging/IRadioMessagingResponse.h>
#include <aidl/android/hardware/radio/modem/IRadioModemResponse.h>
#include <aidl/android/hardware/radio/network/IRadioNetworkResponse.h>
-#include <aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.h>
#include <aidl/android/hardware/radio/sim/IRadioSimResponse.h>
#include <aidl/android/hardware/radio/voice/IRadioVoiceResponse.h>
#include <android/hardware/radio/1.6/IRadioResponse.h>
@@ -55,9 +54,6 @@
GuaranteedCallback<::aidl::android::hardware::radio::ims::IRadioImsResponse,
::aidl::android::hardware::radio::ims::IRadioImsResponseDefault>
mImsCb;
- GuaranteedCallback<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse,
- ::aidl::android::hardware::radio::satellite::IRadioSatelliteResponseDefault>
- mSatelliteCb;
// IRadioResponse @ 1.0
Return<void> getIccCardStatusResponse(const V1_0::RadioResponseInfo& info,
@@ -451,9 +447,6 @@
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceResponse> voiceCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> imsCb);
- void setResponseFunction(
- std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>
- satelliteCb);
std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataResponse> dataCb();
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingResponse>
@@ -463,8 +456,6 @@
std::shared_ptr<::aidl::android::hardware::radio::sim::IRadioSimResponse> simCb();
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceResponse> voiceCb();
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> imsCb();
- std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>
- satelliteCb();
};
} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioSatellite.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioSatellite.h
deleted file mode 100644
index 3ee6db2..0000000
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioSatellite.h
+++ /dev/null
@@ -1,65 +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 "RadioCompatBase.h"
-
-#include <aidl/android/hardware/radio/satellite/BnRadioSatellite.h>
-
-namespace android::hardware::radio::compat {
-
-class RadioSatellite : public RadioCompatBase,
- public aidl::android::hardware::radio::satellite::BnRadioSatellite {
- ::ndk::ScopedAStatus responseAcknowledgement() override;
- ::ndk::ScopedAStatus getCapabilities(int32_t serial) override;
- ::ndk::ScopedAStatus setPower(int32_t serial, bool on) override;
- ::ndk::ScopedAStatus getPowerState(int32_t serial) override;
- ::ndk::ScopedAStatus provisionService(
- int32_t serial, const std::string& imei, const std::string& msisdn,
- const std::string& imsi,
- const std::vector<::aidl::android::hardware::radio::satellite::SatelliteFeature>&
- features) override;
- ::ndk::ScopedAStatus addAllowedSatelliteContacts(
- int32_t serial, const std::vector<std::string>& contacts) override;
- ::ndk::ScopedAStatus removeAllowedSatelliteContacts(
- int32_t serial, const std::vector<std::string>& contacts) override;
- ::ndk::ScopedAStatus sendMessages(int32_t serial, const std::vector<std::string>& messages,
- const std::string& destination, double latitude,
- double longitude) override;
- ::ndk::ScopedAStatus getPendingMessages(int32_t serial) override;
- ::ndk::ScopedAStatus getSatelliteMode(int32_t serial) override;
- ::ndk::ScopedAStatus setIndicationFilter(int32_t serial, int32_t filterBitmask) override;
- ::ndk::ScopedAStatus startSendingSatellitePointingInfo(int32_t serial) override;
- ::ndk::ScopedAStatus stopSendingSatellitePointingInfo(int32_t serial) override;
- ::ndk::ScopedAStatus getMaxCharactersPerTextMessage(int32_t serial) override;
- ::ndk::ScopedAStatus getTimeForNextSatelliteVisibility(int32_t serial) override;
-
- ::ndk::ScopedAStatus setResponseFunctions(
- const std::shared_ptr<
- ::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>&
- radioSatelliteResponse,
- const std::shared_ptr<
- ::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>&
- radioSatelliteIndication) override;
-
- protected:
- std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse> respond();
-
- public:
- using RadioCompatBase::RadioCompatBase;
-};
-
-} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/satellite/RadioIndication-satellite.cpp b/radio/aidl/compat/libradiocompat/satellite/RadioIndication-satellite.cpp
deleted file mode 100644
index 39da43d..0000000
--- a/radio/aidl/compat/libradiocompat/satellite/RadioIndication-satellite.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <libradiocompat/RadioIndication.h>
-
-#include "commonStructs.h"
-#include "debug.h"
-
-#include "collections.h"
-
-#define RADIO_MODULE "RadioSatelliteIndication"
-
-namespace android::hardware::radio::compat {
-
-namespace aidl = ::aidl::android::hardware::radio::satellite;
-
-void RadioIndication::setResponseFunction(
- std::shared_ptr<aidl::IRadioSatelliteIndication> satelliteCb) {
- mSatelliteCb = satelliteCb;
-}
-
-std::shared_ptr<aidl::IRadioSatelliteIndication> RadioIndication::satelliteCb() {
- return mSatelliteCb.get();
-}
-
-} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/satellite/RadioResponse-satellite.cpp b/radio/aidl/compat/libradiocompat/satellite/RadioResponse-satellite.cpp
deleted file mode 100644
index 2209c93..0000000
--- a/radio/aidl/compat/libradiocompat/satellite/RadioResponse-satellite.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <libradiocompat/RadioResponse.h>
-
-#include "commonStructs.h"
-#include "debug.h"
-
-#include "collections.h"
-
-#define RADIO_MODULE "RadioSatelliteResponse"
-
-namespace android::hardware::radio::compat {
-
-namespace aidl = ::aidl::android::hardware::radio::satellite;
-
-void RadioResponse::setResponseFunction(
- std::shared_ptr<aidl::IRadioSatelliteResponse> satelliteCb) {
- mSatelliteCb = satelliteCb;
-}
-
-std::shared_ptr<aidl::IRadioSatelliteResponse> RadioResponse::satelliteCb() {
- return mSatelliteCb.get();
-}
-
-} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/satellite/RadioSatellite.cpp b/radio/aidl/compat/libradiocompat/satellite/RadioSatellite.cpp
deleted file mode 100644
index 16a3167..0000000
--- a/radio/aidl/compat/libradiocompat/satellite/RadioSatellite.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <libradiocompat/RadioSatellite.h>
-
-#include "commonStructs.h"
-#include "debug.h"
-
-#include "collections.h"
-
-#define RADIO_MODULE "RadioSatellite"
-
-namespace android::hardware::radio::compat {
-
-using ::ndk::ScopedAStatus;
-namespace aidl = ::aidl::android::hardware::radio::satellite;
-constexpr auto ok = &ScopedAStatus::ok;
-
-std::shared_ptr<aidl::IRadioSatelliteResponse> RadioSatellite::respond() {
- return mCallbackManager->response().satelliteCb();
-}
-
-ScopedAStatus RadioSatellite::responseAcknowledgement() {
- LOG(ERROR) << " responseAcknowledgement is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::getCapabilities(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " getCapabilities is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::setPower(int32_t serial, bool /*on*/) {
- LOG_CALL << serial;
- LOG(ERROR) << " setPower is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::getPowerState(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " getPowerSate is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::provisionService(
- int32_t serial, const std::string& /*imei*/, const std::string& /*msisdn*/,
- const std::string& /*imsi*/,
- const std::vector<
- ::aidl::android::hardware::radio::satellite::SatelliteFeature>& /*features*/) {
- LOG_CALL << serial;
- LOG(ERROR) << " provisionService is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::addAllowedSatelliteContacts(
- int32_t serial, const std::vector<std::string>& /*contacts*/) {
- LOG_CALL << serial;
- LOG(ERROR) << " addAllowedSatelliteContacts is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::removeAllowedSatelliteContacts(
- int32_t serial, const std::vector<std::string>& /*contacts*/) {
- LOG_CALL << serial;
- LOG(ERROR) << " removeAllowedSatelliteContacts is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::sendMessages(int32_t serial,
- const std::vector<std::string>& /*messages*/,
- const std::string& /*destination*/, double /*latitude*/,
- double /*longitude*/) {
- LOG_CALL << serial;
- LOG(ERROR) << " sendMessage is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::getPendingMessages(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " getPendingMessages is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::getSatelliteMode(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " getSatelliteMode is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::setIndicationFilter(int32_t serial, int32_t /*filterBitmask*/) {
- LOG_CALL << serial;
- LOG(ERROR) << " setIndicationFilter is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::startSendingSatellitePointingInfo(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " startSendingSatellitePointingInfo is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::stopSendingSatellitePointingInfo(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " stopSendingSatellitePointingInfo is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::getMaxCharactersPerTextMessage(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " getMaxCharactersPerTextMessage is unsupported by HIDL HALs";
- return ok();
-}
-ScopedAStatus RadioSatellite::getTimeForNextSatelliteVisibility(int32_t serial) {
- LOG_CALL << serial;
- LOG(ERROR) << " getTimeForNextSatelliteVisibility is unsupported by HIDL HALs";
- return ok();
-}
-
-ScopedAStatus RadioSatellite::setResponseFunctions(
- const std::shared_ptr<aidl::IRadioSatelliteResponse>& response,
- const std::shared_ptr<aidl::IRadioSatelliteIndication>& indication) {
- LOG_CALL << response << ' ' << indication;
- mCallbackManager->setResponseFunctions(response, indication);
- return ok();
-}
-
-} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/service/Android.bp b/radio/aidl/compat/service/Android.bp
index 5d14c85..dff0182 100644
--- a/radio/aidl/compat/service/Android.bp
+++ b/radio/aidl/compat/service/Android.bp
@@ -46,7 +46,6 @@
"android.hardware.radio.modem-V2-ndk",
"android.hardware.radio.network-V2-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.satellite-V1-ndk",
"android.hardware.radio.sim-V2-ndk",
"android.hardware.radio.voice-V2-ndk",
"android.hardware.radio@1.0",
diff --git a/radio/aidl/vts/Android.bp b/radio/aidl/vts/Android.bp
index f112d6d..e79d3c0 100644
--- a/radio/aidl/vts/Android.bp
+++ b/radio/aidl/vts/Android.bp
@@ -58,9 +58,6 @@
"radio_network_test.cpp",
"radio_sap_callback.cpp",
"radio_sap_test.cpp",
- "radio_satellite_indication.cpp",
- "radio_satellite_response.cpp",
- "radio_satellite_test.cpp",
"radio_sim_indication.cpp",
"radio_sim_response.cpp",
"radio_sim_test.cpp",
@@ -83,7 +80,6 @@
"android.hardware.radio.modem-V2-ndk",
"android.hardware.radio.network-V2-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.satellite-V1-ndk",
"android.hardware.radio.sim-V2-ndk",
"android.hardware.radio.voice-V2-ndk",
],
diff --git a/radio/aidl/vts/VtsHalRadioTargetTest.cpp b/radio/aidl/vts/VtsHalRadioTargetTest.cpp
index 86c1099..c04173b 100644
--- a/radio/aidl/vts/VtsHalRadioTargetTest.cpp
+++ b/radio/aidl/vts/VtsHalRadioTargetTest.cpp
@@ -24,7 +24,6 @@
#include "radio_modem_utils.h"
#include "radio_network_utils.h"
#include "radio_sap_utils.h"
-#include "radio_satellite_utils.h"
#include "radio_sim_utils.h"
#include "radio_voice_utils.h"
@@ -80,12 +79,6 @@
testing::ValuesIn(android::getAidlHalInstanceNames(IRadioIms::descriptor)),
android::PrintInstanceNameToString);
-GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RadioSatelliteTest);
-INSTANTIATE_TEST_SUITE_P(
- PerInstance, RadioSatelliteTest,
- testing::ValuesIn(android::getAidlHalInstanceNames(IRadioSatellite::descriptor)),
- android::PrintInstanceNameToString);
-
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RadioImsMediaTest);
INSTANTIATE_TEST_SUITE_P(PerInstance, RadioImsMediaTest,
testing::ValuesIn(android::getAidlHalInstanceNames(IImsMedia::descriptor)),
diff --git a/radio/aidl/vts/radio_aidl_hal_utils.h b/radio/aidl/vts/radio_aidl_hal_utils.h
index 2e6c49c..d515e1a 100644
--- a/radio/aidl/vts/radio_aidl_hal_utils.h
+++ b/radio/aidl/vts/radio_aidl_hal_utils.h
@@ -69,8 +69,6 @@
static constexpr const char* FEATURE_TELEPHONY_IMS = "android.hardware.telephony.ims";
-static constexpr const char* FEATURE_TELEPHONY_SATELLITE = "android.hardware.telephony.satellite";
-
#define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3
#define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3
#define MODEM_SET_SIM_POWER_DELAY_IN_SECONDS 2
diff --git a/radio/aidl/vts/radio_imsmedia_test.cpp b/radio/aidl/vts/radio_imsmedia_test.cpp
index d9e57c9..2b6f5ef 100644
--- a/radio/aidl/vts/radio_imsmedia_test.cpp
+++ b/radio/aidl/vts/radio_imsmedia_test.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <aidl/android/hardware/radio/ims/media/MediaDirection.h>
#include <android-base/logging.h>
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
@@ -44,8 +45,10 @@
int32_t sessionId = 1;
RtpConfig modifyRtpConfig;
- modifyRtpConfig.direction =
- ::aidl::android::hardware::radio::ims::media::MediaDirection::SEND_RECEIVE;
+ modifyRtpConfig.direction = static_cast<int32_t>(MediaDirection::RTP_TX) |
+ static_cast<int32_t>(MediaDirection::RTP_RX) |
+ static_cast<int32_t>(MediaDirection::RTCP_TX) |
+ static_cast<int32_t>(MediaDirection::RTCP_RX);
modifyRtpConfig.remoteAddress.ipAddress = "122.22.22.33";
modifyRtpConfig.remoteAddress.portNumber = 1234;
@@ -90,8 +93,10 @@
int32_t duration = 200;
RtpConfig modifyRtpConfig;
- modifyRtpConfig.direction =
- ::aidl::android::hardware::radio::ims::media::MediaDirection::SEND_RECEIVE;
+ modifyRtpConfig.direction = static_cast<int32_t>(MediaDirection::RTP_TX) |
+ static_cast<int32_t>(MediaDirection::RTP_RX) |
+ static_cast<int32_t>(MediaDirection::RTCP_TX) |
+ static_cast<int32_t>(MediaDirection::RTCP_RX);
modifyRtpConfig.remoteAddress.ipAddress = "122.22.22.33";
modifyRtpConfig.remoteAddress.portNumber = 1234;
@@ -143,8 +148,10 @@
std::vector<RtpHeaderExtension> extensions;
RtpConfig modifyRtpConfig;
- modifyRtpConfig.direction =
- ::aidl::android::hardware::radio::ims::media::MediaDirection::SEND_RECEIVE;
+ modifyRtpConfig.direction = static_cast<int32_t>(MediaDirection::RTP_TX) |
+ static_cast<int32_t>(MediaDirection::RTP_RX) |
+ static_cast<int32_t>(MediaDirection::RTCP_TX) |
+ static_cast<int32_t>(MediaDirection::RTCP_RX);
modifyRtpConfig.remoteAddress.ipAddress = "122.22.22.33";
modifyRtpConfig.remoteAddress.portNumber = 1234;
@@ -190,8 +197,10 @@
MediaQualityThreshold threshold;
RtpConfig modifyRtpConfig;
- modifyRtpConfig.direction =
- ::aidl::android::hardware::radio::ims::media::MediaDirection::SEND_RECEIVE;
+ modifyRtpConfig.direction = static_cast<int32_t>(MediaDirection::RTP_TX) |
+ static_cast<int32_t>(MediaDirection::RTP_RX) |
+ static_cast<int32_t>(MediaDirection::RTCP_TX) |
+ static_cast<int32_t>(MediaDirection::RTCP_RX);
modifyRtpConfig.remoteAddress.ipAddress = "122.22.22.33";
modifyRtpConfig.remoteAddress.portNumber = 1234;
@@ -243,13 +252,14 @@
localEndPoint.rtcpFd = ndk::ScopedFileDescriptor(mRtcpSocketFd);
localEndPoint.modemId = 1;
- rtpConfig.direction =
- ::aidl::android::hardware::radio::ims::media::MediaDirection::SEND_RECEIVE;
+ rtpConfig.direction = static_cast<int32_t>(MediaDirection::RTP_TX) |
+ static_cast<int32_t>(MediaDirection::RTP_RX) |
+ static_cast<int32_t>(MediaDirection::RTCP_TX) |
+ static_cast<int32_t>(MediaDirection::RTCP_RX);
rtpConfig.remoteAddress.ipAddress = "122.22.22.22";
rtpConfig.remoteAddress.portNumber = 2222;
result = radio_imsmedia->openSession(sessionId, localEndPoint, rtpConfig);
-
return result;
}
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/radio/aidl/vts/radio_satellite_indication.cpp b/radio/aidl/vts/radio_satellite_indication.cpp
deleted file mode 100644
index 13e4453..0000000
--- a/radio/aidl/vts/radio_satellite_indication.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "radio_satellite_utils.h"
-
-RadioSatelliteIndication::RadioSatelliteIndication(RadioServiceTest& parent)
- : parent_satellite(parent) {}
-
-ndk::ScopedAStatus RadioSatelliteIndication::onPendingMessageCount(RadioIndicationType /*type*/,
- int32_t /*count*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteIndication::onNewMessages(
- RadioIndicationType /*type*/, const std::vector<std::string>& /*messages*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteIndication::onMessagesTransferComplete(
- RadioIndicationType /*type*/, bool /*complete*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteIndication::onSatellitePointingInfoChanged(
- RadioIndicationType /*type*/, const PointingInfo& /*pointingInfo*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteIndication::onSatelliteModeChanged(RadioIndicationType /*type*/,
- SatelliteMode /*mode*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteIndication::onSatelliteRadioTechnologyChanged(
- RadioIndicationType /*type*/, NTRadioTechnology /*technology*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteIndication::onProvisionStateChanged(
- RadioIndicationType /*type*/, bool /*provisioned*/,
- const std::vector<SatelliteFeature>& /*features*/) {
- return ndk::ScopedAStatus::ok();
-}
diff --git a/radio/aidl/vts/radio_satellite_response.cpp b/radio/aidl/vts/radio_satellite_response.cpp
deleted file mode 100644
index 84d57b2..0000000
--- a/radio/aidl/vts/radio_satellite_response.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "radio_satellite_utils.h"
-
-RadioSatelliteResponse::RadioSatelliteResponse(RadioServiceTest& parent)
- : parent_satellite(parent) {}
-
-ndk::ScopedAStatus RadioSatelliteResponse::acknowledgeRequest(int32_t /*serial*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::getCapabilitiesResponse(
- const RadioResponseInfo& info, const SatelliteCapabilities& /*capabilities*/) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::setPowerResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::getPowerStateResponse(const RadioResponseInfo& info,
- bool /*on*/) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::provisionServiceResponse(const RadioResponseInfo& info,
- bool /*provisioned*/) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::addAllowedSatelliteContactsResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::removeAllowedSatelliteContactsResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::sendMessagesResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::getPendingMessagesResponse(
- const RadioResponseInfo& info, const std::vector<std::string>& /*messages*/) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::getSatelliteModeResponse(
- const RadioResponseInfo& info, SatelliteMode /*mode*/, NTRadioTechnology /*technology*/) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::setIndicationFilterResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::startSendingSatellitePointingInfoResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::stopSendingSatellitePointingInfoResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::getMaxCharactersPerTextMessageResponse(
- const RadioResponseInfo& info, int32_t /*charLimit*/) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioSatelliteResponse::getTimeForNextSatelliteVisibilityResponse(
- const RadioResponseInfo& info, int32_t /*timeInSeconds*/) {
- rspInfo = info;
- parent_satellite.notify(info.serial);
- return ndk::ScopedAStatus::ok();
-}
\ No newline at end of file
diff --git a/radio/aidl/vts/radio_satellite_test.cpp b/radio/aidl/vts/radio_satellite_test.cpp
deleted file mode 100644
index b0358b3..0000000
--- a/radio/aidl/vts/radio_satellite_test.cpp
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <aidl/android/hardware/radio/config/IRadioConfig.h>
-#include <android-base/logging.h>
-#include <android/binder_manager.h>
-
-#include "radio_satellite_utils.h"
-
-#define ASSERT_OK(ret) ASSERT_TRUE(((ret).isOk()))
-
-void RadioSatelliteTest::SetUp() {
- std::string serviceName = GetParam();
-
- if (!isServiceValidForDeviceConfiguration(serviceName)) {
- ALOGI("Skipped the radio satellite tests due to device configuration.");
- GTEST_SKIP();
- }
-
- satellite = IRadioSatellite::fromBinder(
- ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str())));
- ASSERT_NE(nullptr, satellite.get());
-
- rsp_satellite = ndk::SharedRefBase::make<RadioSatelliteResponse>(*this);
- ASSERT_NE(nullptr, rsp_satellite.get());
-
- count_ = 0;
-
- ind_satellite = ndk::SharedRefBase::make<RadioSatelliteIndication>(*this);
- ASSERT_NE(nullptr, ind_satellite.get());
-
- satellite->setResponseFunctions(rsp_satellite, ind_satellite);
-
- // Assert IRadioConfig exists before testing
- radio_config = config::IRadioConfig::fromBinder(ndk::SpAIBinder(
- AServiceManager_waitForService("android.hardware.radio.config.IRadioConfig/default")));
- ASSERT_NE(nullptr, radio_config.get());
-}
-
-/*
- * Test IRadioSatellite.getCapabilities() for the response returned.
- */
-TEST_P(RadioSatelliteTest, getCapabilities) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping getCapabilities because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running getCapabilities because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->getCapabilities(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("getCapabilities, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.setPower() for the response returned.
- */
-TEST_P(RadioSatelliteTest, setPower) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping setPower because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running setPower because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->setPower(serial, true);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("setPower, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.getPowerSate() for the response returned.
- */
-TEST_P(RadioSatelliteTest, getPowerSate) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping getPowerSate because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running getPowerSate because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->getPowerState(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("getPowerSate, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.provisionService() for the response returned.
- */
-TEST_P(RadioSatelliteTest, provisionService) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping provisionService because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running provisionService because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- std::string imei = "imei";
- std::string msisdn = "msisdn";
- std::string imsi = "imsi";
- const std::vector<SatelliteFeature> features{
- SatelliteFeature::SOS_SMS, SatelliteFeature::EMERGENCY_SMS, SatelliteFeature::SMS};
- ndk::ScopedAStatus res = satellite->provisionService(serial, imei, msisdn, imsi, features);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("provisionService, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
- {RadioError::NONE,
- RadioError::ABORTED,
- RadioError::ACCESS_BARRED,
- RadioError::CANCELLED,
- RadioError::FEATURE_NOT_SUPPORTED,
- RadioError::INTERNAL_ERR,
- RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE,
- RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE,
- RadioError::MODEM_ERR,
- RadioError::MODEM_INCOMPATIBLE,
- RadioError::NETWORK_ERR,
- RadioError::NETWORK_NOT_READY,
- RadioError::NETWORK_REJECT,
- RadioError::NETWORK_TIMEOUT,
- RadioError::NO_MEMORY,
- RadioError::NO_NETWORK_FOUND,
- RadioError::NO_RESOURCES,
- RadioError::NO_SATELLITE_SIGNAL,
- RadioError::NO_SUBSCRIPTION,
- RadioError::OPERATION_NOT_ALLOWED,
- RadioError::RADIO_NOT_AVAILABLE,
- RadioError::RADIO_TECHNOLOGY_NOT_SUPPORTED,
- RadioError::REQUEST_NOT_SUPPORTED,
- RadioError::REQUEST_RATE_LIMITED,
- RadioError::SIM_ABSENT,
- RadioError::SIM_BUSY,
- RadioError::SIM_ERR,
- RadioError::SIM_FULL,
- RadioError::SUBSCRIBER_NOT_AUTHORIZED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.addAllowedSatelliteContacts() for the response returned.
- */
-TEST_P(RadioSatelliteTest, addAllowedSatelliteContacts) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping addAllowedSatelliteContacts because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running addAllowedSatelliteContacts because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- const std::vector<std::string> contacts = {"contact 1", "contact 2"};
- ndk::ScopedAStatus res = satellite->addAllowedSatelliteContacts(serial, contacts);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("addAllowedSatelliteContacts, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
- {RadioError::NONE,
- RadioError::ABORTED,
- RadioError::ACCESS_BARRED,
- RadioError::CANCELLED,
- RadioError::INTERNAL_ERR,
- RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_CONTACT,
- RadioError::INVALID_MODEM_STATE,
- RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE,
- RadioError::MODEM_ERR,
- RadioError::NETWORK_ERR,
- RadioError::NETWORK_NOT_READY,
- RadioError::NETWORK_REJECT,
- RadioError::NETWORK_TIMEOUT,
- RadioError::NO_MEMORY,
- RadioError::NO_NETWORK_FOUND,
- RadioError::NO_RESOURCES,
- RadioError::NO_SATELLITE_SIGNAL,
- RadioError::NO_SUBSCRIPTION,
- RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
- RadioError::OPERATION_NOT_ALLOWED,
- RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED,
- RadioError::REQUEST_RATE_LIMITED,
- RadioError::SIM_ABSENT,
- RadioError::SIM_BUSY,
- RadioError::SIM_ERR,
- RadioError::SIM_FULL,
- RadioError::SYSTEM_ERR,
- RadioError::UNIDENTIFIED_SUBSCRIBER}));
-}
-
-/*
- * Test IRadioSatellite.removeAllowedSatelliteContacts() for the response returned.
- */
-TEST_P(RadioSatelliteTest, removeAllowedSatelliteContacts) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping removeAllowedSatelliteContacts because satellite is not supported in "
- "device");
- return;
- } else {
- ALOGI("Running removeAllowedSatelliteContacts because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- const std::vector<std::string> contacts = {"contact 1", "contact 2"};
- ndk::ScopedAStatus res = satellite->removeAllowedSatelliteContacts(serial, contacts);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("removeAllowedSatelliteContacts, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
- {RadioError::NONE,
- RadioError::ABORTED,
- RadioError::ACCESS_BARRED,
- RadioError::CANCELLED,
- RadioError::INTERNAL_ERR,
- RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_CONTACT,
- RadioError::INVALID_MODEM_STATE,
- RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE,
- RadioError::MODEM_ERR,
- RadioError::NETWORK_ERR,
- RadioError::NETWORK_NOT_READY,
- RadioError::NETWORK_REJECT,
- RadioError::NETWORK_TIMEOUT,
- RadioError::NO_MEMORY,
- RadioError::NO_NETWORK_FOUND,
- RadioError::NO_RESOURCES,
- RadioError::NO_SATELLITE_SIGNAL,
- RadioError::NO_SUBSCRIPTION,
- RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
- RadioError::OPERATION_NOT_ALLOWED,
- RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED,
- RadioError::REQUEST_RATE_LIMITED,
- RadioError::SIM_ABSENT,
- RadioError::SIM_BUSY,
- RadioError::SIM_ERR,
- RadioError::SIM_FULL,
- RadioError::SYSTEM_ERR,
- RadioError::UNIDENTIFIED_SUBSCRIBER}));
-}
-
-/*
- * Test IRadioSatellite.sendMessages() for the response returned.
- */
-TEST_P(RadioSatelliteTest, sendMessages) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping sendMessages because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running sendMessages because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- const std::vector<std::string> messages = {"message 1", "message 2"};
- std::string destination = "0123456789";
- ndk::ScopedAStatus res = satellite->sendMessages(serial, messages, destination, 1.0, 2.0);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("sendMessages, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
- {RadioError::NONE,
- RadioError::ABORTED,
- RadioError::ACCESS_BARRED,
- RadioError::BLOCKED_DUE_TO_CALL,
- RadioError::CANCELLED,
- RadioError::ENCODING_ERR,
- RadioError::ENCODING_NOT_SUPPORTED,
- RadioError::INTERNAL_ERR,
- RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE,
- RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_SMS_FORMAT,
- RadioError::INVALID_STATE,
- RadioError::MODEM_ERR,
- RadioError::NETWORK_ERR,
- RadioError::NETWORK_NOT_READY,
- RadioError::NETWORK_REJECT,
- RadioError::NETWORK_TIMEOUT,
- RadioError::NO_MEMORY,
- RadioError::NO_NETWORK_FOUND,
- RadioError::NO_RESOURCES,
- RadioError::NO_SMS_TO_ACK,
- RadioError::NO_SATELLITE_SIGNAL,
- RadioError::NO_SUBSCRIPTION,
- RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
- RadioError::OPERATION_NOT_ALLOWED,
- RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED,
- RadioError::REQUEST_RATE_LIMITED,
- RadioError::SIM_ABSENT,
- RadioError::SIM_BUSY,
- RadioError::SIM_ERR,
- RadioError::SIM_FULL,
- RadioError::SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED,
- RadioError::SMS_SEND_FAIL_RETRY,
- RadioError::SYSTEM_ERR,
- RadioError::SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL,
- RadioError::UNIDENTIFIED_SUBSCRIBER}));
-}
-
-/*
- * Test IRadioSatellite.getPendingMessages() for the response returned.
- */
-TEST_P(RadioSatelliteTest, getPendingMessages) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping getPendingMessages because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running getPendingMessages because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->getPendingMessages(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("getPendingMessages, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
- {RadioError::NONE,
- RadioError::ABORTED,
- RadioError::ACCESS_BARRED,
- RadioError::BLOCKED_DUE_TO_CALL,
- RadioError::CANCELLED,
- RadioError::ENCODING_ERR,
- RadioError::ENCODING_NOT_SUPPORTED,
- RadioError::INTERNAL_ERR,
- RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE,
- RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_SMS_FORMAT,
- RadioError::INVALID_STATE,
- RadioError::MODEM_ERR,
- RadioError::NETWORK_ERR,
- RadioError::NETWORK_NOT_READY,
- RadioError::NETWORK_REJECT,
- RadioError::NETWORK_TIMEOUT,
- RadioError::NO_MEMORY,
- RadioError::NO_NETWORK_FOUND,
- RadioError::NO_RESOURCES,
- RadioError::NO_SMS_TO_ACK,
- RadioError::NO_SATELLITE_SIGNAL,
- RadioError::NO_SUBSCRIPTION,
- RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
- RadioError::OPERATION_NOT_ALLOWED,
- RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED,
- RadioError::REQUEST_RATE_LIMITED,
- RadioError::SIM_ABSENT,
- RadioError::SIM_BUSY,
- RadioError::SIM_ERR,
- RadioError::SIM_FULL,
- RadioError::SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED,
- RadioError::SYSTEM_ERR,
- RadioError::SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL}));
-}
-
-/*
- * Test IRadioSatellite.getSatelliteMode() for the response returned.
- */
-TEST_P(RadioSatelliteTest, getSatelliteMode) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping getSatelliteMode because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running getSatelliteMode because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->getSatelliteMode(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("getSatelliteMode, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.setIndicationFilter() for the response returned.
- */
-TEST_P(RadioSatelliteTest, setIndicationFilter) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping setIndicationFilter because satellite is not supported in device");
- return;
- } else {
- ALOGI("Running setIndicationFilter because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->setIndicationFilter(serial, 0);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("setIndicationFilter, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.startSendingSatellitePointingInfo() for the response returned.
- */
-TEST_P(RadioSatelliteTest, startSendingSatellitePointingInfo) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping startSendingSatellitePointingInfo because satellite is not supported in "
- "device");
- return;
- } else {
- ALOGI("Running startSendingSatellitePointingInfo because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->startSendingSatellitePointingInfo(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("startSendingSatellitePointingInfo, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.stopSatelliteLocationUpdate() for the response returned.
- */
-TEST_P(RadioSatelliteTest, stopSatelliteLocationUpdate) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping stopSendingSatellitePointingInfo because satellite is not supported in "
- "device");
- return;
- } else {
- ALOGI("Running stopSendingSatellitePointingInfo because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->stopSendingSatellitePointingInfo(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("stopSendingSatellitePointingInfo, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.getMaxCharactersPerTextMessage() for the response returned.
- */
-TEST_P(RadioSatelliteTest, getMaxCharactersPerTextMessage) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping getMaxCharactersPerTextMessage because satellite is not supported in "
- "device");
- return;
- } else {
- ALOGI("Running getMaxCharactersPerTextMessage because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->getMaxCharactersPerTextMessage(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("getMaxCharactersPerTextMessage, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
-
-/*
- * Test IRadioSatellite.getTimeForNextSatelliteVisibility() for the response returned.
- */
-TEST_P(RadioSatelliteTest, getTimeForNextSatelliteVisibility) {
- if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
- ALOGI("Skipping getTimeForNextSatelliteVisibility because satellite is not supported in "
- "device");
- return;
- } else {
- ALOGI("Running getTimeForNextSatelliteVisibility because satellite is supported in device");
- }
-
- serial = GetRandomSerialNumber();
- ndk::ScopedAStatus res = satellite->getTimeForNextSatelliteVisibility(serial);
- ASSERT_OK(res);
- EXPECT_EQ(std::cv_status::no_timeout, wait());
- EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
- EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
-
- ALOGI("getTimeForNextSatelliteVisibility, rspInfo.error = %s\n",
- toString(rsp_satellite->rspInfo.error).c_str());
-
- ASSERT_TRUE(CheckAnyOfErrors(
- rsp_satellite->rspInfo.error,
- {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
- RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
- RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
- RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
- RadioError::SYSTEM_ERR}));
-}
\ No newline at end of file
diff --git a/radio/aidl/vts/radio_satellite_utils.h b/radio/aidl/vts/radio_satellite_utils.h
deleted file mode 100644
index 2b07ec5..0000000
--- a/radio/aidl/vts/radio_satellite_utils.h
+++ /dev/null
@@ -1,126 +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 <aidl/android/hardware/radio/satellite/BnRadioSatelliteIndication.h>
-#include <aidl/android/hardware/radio/satellite/BnRadioSatelliteResponse.h>
-#include <aidl/android/hardware/radio/satellite/IRadioSatellite.h>
-
-#include "radio_aidl_hal_utils.h"
-
-using namespace aidl::android::hardware::radio::satellite;
-
-class RadioSatelliteTest;
-
-/* Callback class for Satellite response */
-class RadioSatelliteResponse : public BnRadioSatelliteResponse {
- protected:
- RadioServiceTest& parent_satellite;
-
- public:
- RadioSatelliteResponse(RadioServiceTest& parent_satellite);
- virtual ~RadioSatelliteResponse() = default;
-
- RadioResponseInfo rspInfo;
-
- virtual ndk::ScopedAStatus acknowledgeRequest(int32_t serial) override;
-
- virtual ndk::ScopedAStatus getCapabilitiesResponse(
- const RadioResponseInfo& info, const SatelliteCapabilities& capabilities) override;
-
- virtual ndk::ScopedAStatus setPowerResponse(const RadioResponseInfo& info) override;
-
- virtual ndk::ScopedAStatus getPowerStateResponse(const RadioResponseInfo& info,
- bool on) override;
-
- virtual ndk::ScopedAStatus provisionServiceResponse(const RadioResponseInfo& info,
- bool provisioned) override;
-
- virtual ndk::ScopedAStatus addAllowedSatelliteContactsResponse(
- const RadioResponseInfo& info) override;
-
- virtual ndk::ScopedAStatus removeAllowedSatelliteContactsResponse(
- const RadioResponseInfo& info) override;
-
- virtual ndk::ScopedAStatus sendMessagesResponse(const RadioResponseInfo& info) override;
-
- virtual ndk::ScopedAStatus getPendingMessagesResponse(
- const RadioResponseInfo& info, const std::vector<std::string>& /*messages*/) override;
-
- virtual ndk::ScopedAStatus getSatelliteModeResponse(
- const RadioResponseInfo& info, SatelliteMode mode,
- satellite::NTRadioTechnology technology) override;
-
- virtual ndk::ScopedAStatus setIndicationFilterResponse(const RadioResponseInfo& info) override;
-
- virtual ndk::ScopedAStatus startSendingSatellitePointingInfoResponse(
- const RadioResponseInfo& info) override;
-
- virtual ndk::ScopedAStatus stopSendingSatellitePointingInfoResponse(
- const RadioResponseInfo& info) override;
-
- virtual ndk::ScopedAStatus getMaxCharactersPerTextMessageResponse(const RadioResponseInfo& info,
- int32_t charLimit) override;
-
- virtual ndk::ScopedAStatus getTimeForNextSatelliteVisibilityResponse(
- const RadioResponseInfo& info, int32_t timeInSeconds) override;
-};
-
-/* Callback class for Satellite indication */
-class RadioSatelliteIndication : public BnRadioSatelliteIndication {
- protected:
- RadioServiceTest& parent_satellite;
-
- public:
- RadioSatelliteIndication(RadioServiceTest& parent_satellite);
- virtual ~RadioSatelliteIndication() = default;
-
- virtual ndk::ScopedAStatus onPendingMessageCount(RadioIndicationType type,
- int32_t count) override;
-
- virtual ndk::ScopedAStatus onNewMessages(RadioIndicationType type,
- const std::vector<std::string>& messages) override;
-
- virtual ndk::ScopedAStatus onMessagesTransferComplete(RadioIndicationType type,
- bool complete) override;
-
- virtual ndk::ScopedAStatus onSatellitePointingInfoChanged(
- RadioIndicationType type, const PointingInfo& pointingInfo) override;
-
- virtual ndk::ScopedAStatus onSatelliteModeChanged(RadioIndicationType type,
- SatelliteMode mode) override;
-
- virtual ndk::ScopedAStatus onSatelliteRadioTechnologyChanged(
- RadioIndicationType type, satellite::NTRadioTechnology technology) override;
-
- virtual ndk::ScopedAStatus onProvisionStateChanged(
- RadioIndicationType type, bool provisioned,
- const std::vector<SatelliteFeature>& features) override;
-};
-
-// The main test class for AIDL Satellite.
-class RadioSatelliteTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
- public:
- virtual void SetUp() override;
-
- /* Radio Satellite service handle */
- std::shared_ptr<IRadioSatellite> satellite;
- /* Radio Satellite response handle */
- std::shared_ptr<RadioSatelliteResponse> rsp_satellite;
- /* Radio Satellite indication handle */
- std::shared_ptr<RadioSatelliteIndication> ind_satellite;
-};
diff --git a/scripts/anapic_hidl2aidl_review.sh b/scripts/anapic_hidl2aidl_review.sh
index 330ae32..ce72160 100755
--- a/scripts/anapic_hidl2aidl_review.sh
+++ b/scripts/anapic_hidl2aidl_review.sh
@@ -1,4 +1,11 @@
#!/bin/bash
+#
+# Create two CLs for the given HIDL interface to see the diff between the
+# hidl2aidl output and the source at the tip-of-tree.
+# The first CL contains the hidl2aidl output after removing all existing AIDL
+# files.
+# The second CL contains all of the changes on top of the raw hidl2aidl output
+# that can be used for review.
if [[ $# -ne 1 ]]; then
echo "Usage: $0 INTERFACE_NAME"
@@ -23,5 +30,6 @@
git commit -am "convert $1" --no-edit
git revert HEAD --no-edit
git commit --amend --no-edit
-repo upload . --no-verify
+git diff HEAD~1 --stat
+repo upload . --no-verify --wip --hashtag=anapic_release_review
popd
diff --git a/scripts/anapic_release_diff.sh b/scripts/anapic_release_diff.sh
new file mode 100755
index 0000000..c22d9e5
--- /dev/null
+++ b/scripts/anapic_release_diff.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# Create a CL that contains the changes between this branch and a newer branch
+# for a given AIDL interface.
+# Be sure that BRANCH_BASE is the current upstream branch in order to get a CL.
+
+if [[ $# -ne 3 ]]; then
+ echo "Usage: $0 BRANCH_BASE BRANCH_NEW PACKAGE_NAME"
+ echo "- BRANCH_BASE current branch, typically a previous release's dev branch"
+ echo "- BRANCH_NEW end branch, typically goog/master as the latest branch"
+ echo "- PACKAGE_NAME this is the AIDL package name"
+ echo "example of creating the diffs for android.hardware.boot"
+ echo "$ git checkout tm-dev ; repo start review"
+ echo "$ ./anapic_release_diff.sh goog/tm-dev goog/master android.hardware.boot"
+ exit 1
+fi
+
+# for pathmod
+source ${ANDROID_BUILD_TOP}/build/make/envsetup.sh
+
+set -ex
+
+INTERFACE_NAME_NO_VER=${3%@*}
+pushd $(pathmod $INTERFACE_NAME_NO_VER)
+git diff "$1".."$2" android | git apply
+git add -A
+git commit -am "Android $1 to $2: $3" --no-edit
+git diff HEAD~1 --stat
+repo upload . --no-verify --wip --hashtag=anapic_release_review
+popd
diff --git a/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl b/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl
index b9ce9d1..8c0dd6d 100644
--- a/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl
+++ b/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl
@@ -123,6 +123,9 @@
/**
* Transmits an APDU command (as per ISO/IEC 7816) to the SE.
*
+ * @throws ServiceSpecificException with code CHANNEL_NOT_AVAILABLE
+ * if there was an error in communicating with the secure element.
+ *
* @param data APDU command to be sent
* @return response to the command
*/
diff --git a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
index 2e96f7d..0925a21 100644
--- a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
+++ b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
@@ -136,18 +136,27 @@
apdu[0] |= (channel_number - 4) | 0x40;
}
- EXPECT_OK(secure_element_->transmit(apdu, &response));
+ // transmit() will return an empty response with the error
+ // code CHANNEL_NOT_AVAILABLE when the SE cannot be
+ // communicated with.
+ auto status = secure_element_->transmit(apdu, &response);
+ if (!status.isOk()) {
+ return 0x6881;
+ }
+
+ // transmit() will return a response containing at least
+ // the APDU response status otherwise.
EXPECT_GE(response.size(), 2u);
- uint16_t status =
+ uint16_t apdu_status =
(response[response.size() - 2] << 8) | (response[response.size() - 1] << 0);
// When the command is successful the response
// must contain 256 bytes of data.
- if (status == 0x9000) {
+ if (apdu_status == 0x9000) {
EXPECT_EQ(response.size(), 258);
}
- return status;
+ return apdu_status;
}
std::shared_ptr<ISecureElement> secure_element_;
diff --git a/security/dice/aidl/Android.bp b/security/dice/aidl/Android.bp
deleted file mode 100644
index 5625d70..0000000
--- a/security/dice/aidl/Android.bp
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2021, The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "hardware_interfaces_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["hardware_interfaces_license"],
-}
-
-aidl_interface {
- name: "android.hardware.security.dice",
- vendor_available: true,
- srcs: [
- "android/hardware/security/dice/*.aidl",
- ],
- stability: "vintf",
- backend: {
- java: {
- enabled: false,
- platform_apis: false,
- },
- ndk: {
- apps_enabled: false,
- apex_available: [
- "//apex_available:platform",
- "com.android.compos",
- ],
- },
- rust: {
- enabled: true,
- apex_available: [
- "//apex_available:platform",
- "com.android.compos",
- ],
- },
- },
- versions_with_info: [
- {
- version: "1",
- imports: [],
- },
- ],
-
- // versions: ["1"],
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/.hash b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/.hash
deleted file mode 100644
index 3f08fd8..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/.hash
+++ /dev/null
@@ -1 +0,0 @@
-02994f275fd7b1b40610c10eaeb0573f4312e358
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Bcc.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Bcc.aidl
deleted file mode 100644
index 5af7358..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Bcc.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable Bcc {
- byte[] data;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/BccHandover.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/BccHandover.aidl
deleted file mode 100644
index 8baca94..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/BccHandover.aidl
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable BccHandover {
- byte[32] cdiAttest;
- byte[32] cdiSeal;
- android.hardware.security.dice.Bcc bcc;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Config.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Config.aidl
deleted file mode 100644
index 78dd2f8..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Config.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable Config {
- byte[] desc;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/IDiceDevice.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/IDiceDevice.aidl
deleted file mode 100644
index 383f4d1..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/IDiceDevice.aidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@SensitiveData @VintfStability
-interface IDiceDevice {
- android.hardware.security.dice.Signature sign(in android.hardware.security.dice.InputValues[] id, in byte[] payload);
- android.hardware.security.dice.Bcc getAttestationChain(in android.hardware.security.dice.InputValues[] inputValues);
- android.hardware.security.dice.BccHandover derive(in android.hardware.security.dice.InputValues[] inputValues);
- void demote(in android.hardware.security.dice.InputValues[] inputValues);
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/InputValues.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/InputValues.aidl
deleted file mode 100644
index e43c429..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/InputValues.aidl
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable InputValues {
- byte[64] codeHash;
- android.hardware.security.dice.Config config;
- byte[64] authorityHash;
- @nullable byte[] authorityDescriptor;
- android.hardware.security.dice.Mode mode = android.hardware.security.dice.Mode.NOT_INITIALIZED;
- byte[64] hidden;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Mode.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Mode.aidl
deleted file mode 100644
index 295c32e..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Mode.aidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@Backing(type="int") @VintfStability
-enum Mode {
- NOT_INITIALIZED = 0,
- NORMAL = 1,
- DEBUG = 2,
- RECOVERY = 3,
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/ResponseCode.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/ResponseCode.aidl
deleted file mode 100644
index c13afa6..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/ResponseCode.aidl
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2020, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-@Backing(type="int") @VintfStability
-enum ResponseCode {
- PERMISSION_DENIED = 1,
- SYSTEM_ERROR = 2,
- NOT_IMPLEMENTED = 3,
- DEMOTION_FAILED = 4,
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Signature.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Signature.aidl
deleted file mode 100644
index 294170d..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Signature.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable Signature {
- byte[] data;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Bcc.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Bcc.aidl
deleted file mode 100644
index 5af7358..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Bcc.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable Bcc {
- byte[] data;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/BccHandover.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/BccHandover.aidl
deleted file mode 100644
index 8baca94..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/BccHandover.aidl
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable BccHandover {
- byte[32] cdiAttest;
- byte[32] cdiSeal;
- android.hardware.security.dice.Bcc bcc;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Config.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Config.aidl
deleted file mode 100644
index 78dd2f8..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Config.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable Config {
- byte[] desc;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/IDiceDevice.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/IDiceDevice.aidl
deleted file mode 100644
index 383f4d1..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/IDiceDevice.aidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@SensitiveData @VintfStability
-interface IDiceDevice {
- android.hardware.security.dice.Signature sign(in android.hardware.security.dice.InputValues[] id, in byte[] payload);
- android.hardware.security.dice.Bcc getAttestationChain(in android.hardware.security.dice.InputValues[] inputValues);
- android.hardware.security.dice.BccHandover derive(in android.hardware.security.dice.InputValues[] inputValues);
- void demote(in android.hardware.security.dice.InputValues[] inputValues);
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/InputValues.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/InputValues.aidl
deleted file mode 100644
index e43c429..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/InputValues.aidl
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable InputValues {
- byte[64] codeHash;
- android.hardware.security.dice.Config config;
- byte[64] authorityHash;
- @nullable byte[] authorityDescriptor;
- android.hardware.security.dice.Mode mode = android.hardware.security.dice.Mode.NOT_INITIALIZED;
- byte[64] hidden;
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Mode.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Mode.aidl
deleted file mode 100644
index 295c32e..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Mode.aidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@Backing(type="int") @VintfStability
-enum Mode {
- NOT_INITIALIZED = 0,
- NORMAL = 1,
- DEBUG = 2,
- RECOVERY = 3,
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/ResponseCode.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/ResponseCode.aidl
deleted file mode 100644
index c13afa6..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/ResponseCode.aidl
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2020, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-@Backing(type="int") @VintfStability
-enum ResponseCode {
- PERMISSION_DENIED = 1,
- SYSTEM_ERROR = 2,
- NOT_IMPLEMENTED = 3,
- DEMOTION_FAILED = 4,
-}
diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Signature.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Signature.aidl
deleted file mode 100644
index 294170d..0000000
--- a/security/dice/aidl/aidl_api/android.hardware.security.dice/current/android/hardware/security/dice/Signature.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.security.dice;
-/* @hide */
-@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
-parcelable Signature {
- byte[] data;
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/Bcc.aidl b/security/dice/aidl/android/hardware/security/dice/Bcc.aidl
deleted file mode 100644
index 983915e..0000000
--- a/security/dice/aidl/android/hardware/security/dice/Bcc.aidl
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-/**
- * A DICE certificate chain following the Boot Certificate Chain (BCC) specification.
- * @hide
- */
-@VintfStability
-@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
-parcelable Bcc {
- /**
- * The DICE certificate chain CBOR encoded following the BCC specification. The CDDL
- * specification for BCC can be found here [1].
- *
- * @see <a
- * href="https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl">
- * BCC CDDL specification
- * </a>
- */
- byte[] data;
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/BccHandover.aidl b/security/dice/aidl/android/hardware/security/dice/BccHandover.aidl
deleted file mode 100644
index 6ca862c..0000000
--- a/security/dice/aidl/android/hardware/security/dice/BccHandover.aidl
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-import android.hardware.security.dice.Bcc;
-
-/**
- * Represents one set of DICE artifacts.
- *
- * @hide
- */
-@VintfStability
-@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
-parcelable BccHandover {
- /**
- * CDI_attest. Must be exactly 32 bytes of data.
- */
- byte[32] cdiAttest;
- /**
- * CDI_seal. Must be exactly 32 bytes of data.
- */
- byte[32] cdiSeal;
- /**
- * CBOR encoded BCC.
- *
- * @see <a
- * href="https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl">
- * BCC CDDL specification
- * </a>
- */
- Bcc bcc;
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/Config.aidl b/security/dice/aidl/android/hardware/security/dice/Config.aidl
deleted file mode 100644
index 6decfc5..0000000
--- a/security/dice/aidl/android/hardware/security/dice/Config.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-/**
- * DICE config descriptor as described in at
- * <a
- * href="https://pigweed.googlesource.com/open-dice/+/refs/heads/main/docs/specification.md#input-values">
- * input-values
- * </a>
- * @hide
- */
-@VintfStability
-@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
-parcelable Config {
- /**
- * A free form descriptor. This should follow the BCC Configuration Descriptor.
- * @see <a
- * href="https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl">
- * BccPayload field -4670548
- * </a>
- */
- byte[] desc;
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/IDiceDevice.aidl b/security/dice/aidl/android/hardware/security/dice/IDiceDevice.aidl
deleted file mode 100644
index 709aede..0000000
--- a/security/dice/aidl/android/hardware/security/dice/IDiceDevice.aidl
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-import android.hardware.security.dice.Bcc;
-import android.hardware.security.dice.BccHandover;
-import android.hardware.security.dice.InputValues;
-import android.hardware.security.dice.Signature;
-
-/**
- * IDiceDevice specifies an interface that allows access to the Android instance's DICE artifacts.
- *
- * <h2>Features</h2>
- *
- * The dice device provides access to the component's CDI_SEAL and CDI_ATTEST secrets as well
- * as to its attestation certificate chain. The "component" is the Android instance running this
- * HAL service and the secrets and attestation chain must include all boot stage components,
- * the kernel, and the verified boot information (VBA).
- *
- * Implementations provide the following operations:
- * <li> sign - Signing a payload with a key derived from CDI_ATTEST.
- * <li> getAttestationChain - Retrieve the component's attestation certificate chain.
- * <li> derive - Retrieve the component's DICE artifacts.
- *
- * @see <a
- * href="https://pigweed.googlesource.com/open-dice/+/refs/heads/main/docs/specification.md">
- * Open-dice Specification
- * </a>
- * @see <a
- * href="https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl">
- * Boot Certificate Chain (BCC) CDDL specification
- * </a>
- * @hide
- */
-@SensitiveData
-@VintfStability
-interface IDiceDevice {
- /**
- * Uses the a key derived from the component's, or a child's given by <code>inputValues</code>,
- * attestation secret to sign the payload using RFC 8032 Pure Ed25519 and returns the
- * signature. The payload is limited to 1024 bytes.
- *
- * @see <a href="https://datatracker.ietf.org/doc/html/rfc8032">RFC 8032</a>
- */
- Signature sign(in InputValues[] id, in byte[] payload);
-
- /**
- * Returns the attestation chain of the component if <code>inputValues</code> is empty or the
- * chain to the given child of the component identified by the <code>inputValues</code> vector.
- *
- * ## Error as service specific exception:
- * ResponseCode::PERMISSION_DENIED if the caller is not sufficiently privileged.
- */
- Bcc getAttestationChain(in InputValues[] inputValues);
-
- /**
- * This function allows a client to become a resident node. A resident node is a node that
- * manages its own dice secrets as opposed to using them by proxy, i.e., by calling sign
- * and getAttestationChain. Called with empty <code>inputValues</code> vectors, an
- * implementation returns the component's DICE secrets. If the <code>inputValues</code> vector
- * is given the appropriate derivations are performed starting from the component's level.
- *
- * ## Error as service specific exception:
- * ResponseCode::PERMISSION_DENIED if the implementation does not allow resident nodes
- * at the client's level.
- */
- BccHandover derive(in InputValues[] inputValues);
-
- /**
- * This demotes the implementation of this interface.
- * When called, the implementation performs appropriate derivation steps using
- * <code>inputValues</code>, traversing the vector in ascending order. Then it replaces its
- * stored DICE artifacts with the newly derived ones.
- *
- * IMPORTANT: When the function returns, all remnants of the previous DICE artifacts must
- * have been purged from memory.
- *
- * This operation is not reversible until the next reboot. Further demotion is always
- * possible.
- *
- * ## Error as service specific exception:
- * ResponseCode::DEMOTION_FAILED if the implementation failed to demote itself
- * or was unable to purge previous DICE artifacts from memory.
- */
- void demote(in InputValues[] inputValues);
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/InputValues.aidl b/security/dice/aidl/android/hardware/security/dice/InputValues.aidl
deleted file mode 100644
index 711d523..0000000
--- a/security/dice/aidl/android/hardware/security/dice/InputValues.aidl
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-import android.hardware.security.dice.Config;
-import android.hardware.security.dice.Mode;
-
-/**
- * DICE input values for certificate and CDI generation.
- *
- * @see <a
- * href="https://pigweed.googlesource.com/open-dice/+/refs/heads/main/docs/specification.md#input-values">
- * Open-dice input-values
- * </a>
- * @hide
- */
-@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
-@VintfStability
-parcelable InputValues {
- /**
- * The target code hash. Must be exactly 64 bytes.
- */
- byte[64] codeHash;
- /**
- * The configuration data.
- */
- Config config;
- /**
- * The authority hash. Must be exactly 64 bytes. Must be all zero if unused.
- */
- byte[64] authorityHash;
- /**
- * Optional free form authorityDescriptor.
- */
- @nullable byte[] authorityDescriptor;
- /**
- * The mode of operation. Normal, Debug, Maintenance, or not initialized.
- */
- Mode mode = Mode.NOT_INITIALIZED;
- /**
- * Optional hidden values. Must be exactly 64 bytes. Must be all zero if unused.
- */
- byte[64] hidden;
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/Mode.aidl b/security/dice/aidl/android/hardware/security/dice/Mode.aidl
deleted file mode 100644
index 3b3bfdc..0000000
--- a/security/dice/aidl/android/hardware/security/dice/Mode.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-/**
- * DICE mode values as defined at
- *
- * @see <a
- * href="https://pigweed.googlesource.com/open-dice/+/refs/heads/main/docs/specification.md#mode-value-details">
- * open-dice mode-value-details
- * </a>
- * @hide
- */
-@Backing(type="int")
-@VintfStability
-enum Mode {
- NOT_INITIALIZED = 0,
- NORMAL = 1,
- DEBUG = 2,
- /**
- * The recovery mode is also referred to as "maintenance" mode.
- */
- RECOVERY = 3,
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/ResponseCode.aidl b/security/dice/aidl/android/hardware/security/dice/ResponseCode.aidl
deleted file mode 100644
index 3e77cf7..0000000
--- a/security/dice/aidl/android/hardware/security/dice/ResponseCode.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2020, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-@Backing(type="int")
-/**
- * These response codes are used as service specific exception codes by
- * IDiceDevice.
- * @hide
- */
-@VintfStability
-enum ResponseCode {
- /**
- * The caller has insufficient privilege to access the DICE API.
- */
- PERMISSION_DENIED = 1,
- /**
- * An unexpected error occurred, likely with IO or IPC.
- */
- SYSTEM_ERROR = 2,
- /**
- * Returned if the called function is not implemented.
- */
- NOT_IMPLEMENTED = 3,
- /**
- * An attempt to demote the implementation failed.
- */
- DEMOTION_FAILED = 4,
-}
diff --git a/security/dice/aidl/android/hardware/security/dice/Signature.aidl b/security/dice/aidl/android/hardware/security/dice/Signature.aidl
deleted file mode 100644
index ea3594f..0000000
--- a/security/dice/aidl/android/hardware/security/dice/Signature.aidl
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2021, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.security.dice;
-
-/**
- * This parcelable represents a Signature. It is used as return value of IDiceNode::sign.
- *
- * @hide
- */
-@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
-@VintfStability
-parcelable Signature {
- /**
- * The RFC 8032 PureEd25519 signature.
- * @see <a href="https://datatracker.ietf.org/doc/html/rfc8032">RFC 8032</a>
- */
- byte[] data;
-}
diff --git a/security/dice/aidl/default/Android.bp b/security/dice/aidl/default/Android.bp
deleted file mode 100644
index 5ff4847..0000000
--- a/security/dice/aidl/default/Android.bp
+++ /dev/null
@@ -1,29 +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"],
-}
-
-rust_binary {
- name: "android.hardware.security.dice-service.non-secure-software",
- srcs: ["service.rs"],
- relative_install_path: "hw",
- vendor: true,
- rustlibs: [
- "android.hardware.security.dice-V1-rust",
- "libdiced_sample_inputs",
- "libdiced_vendor",
- "libandroid_logger",
- "libanyhow",
- "libbinder_rs",
- "liblog_rust",
- "libserde",
- ],
- init_rc: ["android.hardware.security.dice-service.non-secure-software.rc"],
- vintf_fragments: [
- "android.hardware.security.dice-service.non-secure-software.xml",
- ],
-}
diff --git a/security/dice/aidl/default/android.hardware.security.dice-service.non-secure-software.rc b/security/dice/aidl/default/android.hardware.security.dice-service.non-secure-software.rc
deleted file mode 100644
index 28e43c3..0000000
--- a/security/dice/aidl/default/android.hardware.security.dice-service.non-secure-software.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-service vendor.dice /vendor/bin/hw/android.hardware.security.dice-service.non-secure-software
- class early_hal
- user nobody
- # The diced HAL cannot be allowed to restart. When it crashes for any reason.
- # it loses security critical state. The only remedy is to restart the device.
- # This may be implementation depended. It is safe to restart the HAL if the
- # state change during a call to "demote" is is preserved.
- # see android/hardware/security/dice/IDiceDevice.aidl for details on "demote".
- oneshot
diff --git a/security/dice/aidl/default/android.hardware.security.dice-service.non-secure-software.xml b/security/dice/aidl/default/android.hardware.security.dice-service.non-secure-software.xml
deleted file mode 100644
index 94ef243..0000000
--- a/security/dice/aidl/default/android.hardware.security.dice-service.non-secure-software.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<manifest version="1.0" type="device">
- <hal format="aidl">
- <name>android.hardware.security.dice</name>
- <fqname>IDiceDevice/default</fqname>
- </hal>
-</manifest>
\ No newline at end of file
diff --git a/security/dice/aidl/default/service.rs b/security/dice/aidl/default/service.rs
deleted file mode 100644
index 4363e91..0000000
--- a/security/dice/aidl/default/service.rs
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2021, The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-//! Main entry point for the android.hardware.security.dice service.
-
-use anyhow::{anyhow, Result};
-use diced::{
- dice,
- hal_node::{DiceArtifacts, DiceDevice, ResidentHal, UpdatableDiceArtifacts},
-};
-use diced_sample_inputs::make_sample_bcc_and_cdis;
-use serde::{Deserialize, Serialize};
-use std::panic;
-use std::sync::Arc;
-
-static DICE_HAL_SERVICE_NAME: &str = "android.hardware.security.dice.IDiceDevice/default";
-
-#[derive(Debug, Serialize, Deserialize, Clone)]
-struct InsecureSerializableArtifacts {
- cdi_attest: [u8; dice::CDI_SIZE],
- cdi_seal: [u8; dice::CDI_SIZE],
- bcc: Vec<u8>,
-}
-
-impl DiceArtifacts for InsecureSerializableArtifacts {
- fn cdi_attest(&self) -> &[u8; dice::CDI_SIZE] {
- &self.cdi_attest
- }
- fn cdi_seal(&self) -> &[u8; dice::CDI_SIZE] {
- &self.cdi_seal
- }
- fn bcc(&self) -> Option<&[u8]> {
- Some(&self.bcc)
- }
-}
-
-impl UpdatableDiceArtifacts for InsecureSerializableArtifacts {
- fn with_artifacts<F, T>(&self, f: F) -> Result<T>
- where
- F: FnOnce(&dyn DiceArtifacts) -> Result<T>,
- {
- f(self)
- }
- fn update(self, new_artifacts: &impl DiceArtifacts) -> Result<Self> {
- Ok(Self {
- cdi_attest: *new_artifacts.cdi_attest(),
- cdi_seal: *new_artifacts.cdi_seal(),
- bcc: new_artifacts
- .bcc()
- .ok_or_else(|| anyhow!("bcc is none"))?
- .to_vec(),
- })
- }
-}
-
-fn main() {
- android_logger::init_once(
- android_logger::Config::default()
- .with_tag("android.hardware.security.dice")
- .with_min_level(log::Level::Debug),
- );
- // Redirect panic messages to logcat.
- panic::set_hook(Box::new(|panic_info| {
- log::error!("{}", panic_info);
- }));
-
- // Saying hi.
- log::info!("android.hardware.security.dice is starting.");
-
- let dice_artifacts =
- make_sample_bcc_and_cdis().expect("Failed to construct sample dice chain.");
- let mut cdi_attest = [0u8; dice::CDI_SIZE];
- cdi_attest.copy_from_slice(dice_artifacts.cdi_attest());
- let mut cdi_seal = [0u8; dice::CDI_SIZE];
- cdi_seal.copy_from_slice(dice_artifacts.cdi_seal());
- let hal_impl = Arc::new(
- unsafe {
- // Safety: ResidentHal cannot be used in multi threaded processes.
- // This service does not start a thread pool. The main thread is the only thread
- // joining the thread pool, thereby keeping the process single threaded.
- ResidentHal::new(InsecureSerializableArtifacts {
- cdi_attest,
- cdi_seal,
- bcc: dice_artifacts.bcc().expect("bcc is none").to_vec(),
- })
- }
- .expect("Failed to create ResidentHal implementation."),
- );
-
- let hal = DiceDevice::new_as_binder(hal_impl).expect("Failed to construct hal service.");
-
- binder::add_service(DICE_HAL_SERVICE_NAME, hal.as_binder())
- .expect("Failed to register IDiceDevice Service");
-
- log::info!("Joining thread pool now.");
- binder::ProcessState::join_thread_pool();
-}
diff --git a/security/dice/aidl/vts/functional/Android.bp b/security/dice/aidl/vts/functional/Android.bp
deleted file mode 100644
index 2a85a19..0000000
--- a/security/dice/aidl/vts/functional/Android.bp
+++ /dev/null
@@ -1,54 +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"],
-}
-
-rust_test {
- name: "VtsAidlDiceTargetTest",
- srcs: [
- "dice_test.rs",
- ],
- require_root: true,
- auto_gen_config: true,
- test_suites: [
- "general-tests",
- "vts",
- ],
-
- rustlibs: [
- "android.hardware.security.dice-V1-rust",
- "libanyhow",
- "libbinder_rs",
- "libdiced_open_dice",
- "libdiced_sample_inputs",
- "libdiced_utils",
- "libkeystore2_vintf_rust",
- ],
-}
-
-rust_test {
- name: "VtsAidlDiceDemoteTargetTest",
- srcs: [
- "dice_demote_test.rs",
- ],
-
- test_config: "VtsAidlDiceDemoteTargetTest.xml",
- test_suites: [
- "general-tests",
- "vts",
- ],
-
- rustlibs: [
- "android.hardware.security.dice-V1-rust",
- "libanyhow",
- "libbinder_rs",
- "libdiced_open_dice",
- "libdiced_sample_inputs",
- "libdiced_utils",
- "libkeystore2_vintf_rust",
- ],
-}
diff --git a/security/dice/aidl/vts/functional/VtsAidlDiceDemoteTargetTest.xml b/security/dice/aidl/vts/functional/VtsAidlDiceDemoteTargetTest.xml
deleted file mode 100644
index 2991580..0000000
--- a/security/dice/aidl/vts/functional/VtsAidlDiceDemoteTargetTest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<configuration description="Config to run VtsAidlDiceDemoteTargetTest device tests.">
-
- <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
- </target_preparer>
-
- <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
- <option name="cleanup" value="true" />
- <option name="push" value="VtsAidlDiceDemoteTargetTest->/data/local/tmp/VtsAidlDiceDemoteTargetTest" />
- </target_preparer>
-
- <test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
- <option name="test-device-path" value="/data/local/tmp" />
- <option name="module-name" value="VtsAidlDiceDemoteTargetTest" />
- </test>
- <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
-
-</configuration>
\ No newline at end of file
diff --git a/security/dice/aidl/vts/functional/dice_demote_test.rs b/security/dice/aidl/vts/functional/dice_demote_test.rs
deleted file mode 100644
index 49aea67..0000000
--- a/security/dice/aidl/vts/functional/dice_demote_test.rs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2021, The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-use diced_open_dice::DiceArtifacts;
-use diced_sample_inputs;
-use diced_utils;
-use std::convert::TryInto;
-
-mod utils;
-use utils::with_connection;
-
-// This test calls derive with an empty argument vector, then demotes the HAL using
-// a set of three input values, and then calls derive with empty argument vector again.
-// It then performs the same three derivation steps on the result of the former and compares
-// the result to the result of the latter.
-#[test]
-fn demote_test() {
- with_connection(|device| {
- let input_values = diced_sample_inputs::get_input_values_vector();
- let former = device.derive(&[]).expect("Trying to call derive.");
- device
- .demote(&input_values)
- .expect("Trying to call demote with input values.");
-
- let latter = device
- .derive(&[])
- .expect("Trying to call derive after demote.");
-
- let artifacts = diced_utils::ResidentArtifacts::new(
- former.cdiAttest[..].try_into().unwrap(),
- former.cdiSeal[..].try_into().unwrap(),
- &former.bcc.data,
- )
- .unwrap();
-
- let artifacts = artifacts.execute_steps(input_values.iter()).unwrap();
- let from_former = diced_utils::make_bcc_handover(
- artifacts.cdi_attest(),
- artifacts.cdi_seal(),
- artifacts.bcc().expect("bcc is none"),
- )
- .unwrap();
- // TODO b/204938506 when we have a parser/verifier, check equivalence rather
- // than bit by bit equality.
- assert_eq!(latter, from_former);
- Ok(())
- })
-}
diff --git a/security/dice/aidl/vts/functional/dice_test.rs b/security/dice/aidl/vts/functional/dice_test.rs
deleted file mode 100644
index fbbdd81..0000000
--- a/security/dice/aidl/vts/functional/dice_test.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2021, The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-use diced_open_dice::DiceArtifacts;
-use diced_sample_inputs;
-use diced_utils;
-
-mod utils;
-use utils::with_connection;
-
-static TEST_MESSAGE: &[u8] = &[
- // "My test message!"
- 0x4d, 0x79, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x21,
- 0x0a,
-];
-
-// This test calls derive with an empty argument vector and with a set of three input values.
-// It then performs the same three derivation steps on the result of the former and compares
-// the result to the result of the latter.
-#[test]
-fn equivalence_test() {
- with_connection(|device| {
- let input_values = diced_sample_inputs::get_input_values_vector();
- let former = device.derive(&[]).expect("Trying to call derive.");
- let latter = device
- .derive(&input_values)
- .expect("Trying to call derive with input values.");
- let artifacts = diced_utils::ResidentArtifacts::new(
- former.cdiAttest[..].try_into().unwrap(),
- former.cdiSeal[..].try_into().unwrap(),
- &former.bcc.data,
- )
- .unwrap();
-
- let artifacts = artifacts.execute_steps(input_values.iter()).unwrap();
- let from_former = diced_utils::make_bcc_handover(
- artifacts.cdi_attest(),
- artifacts.cdi_seal(),
- artifacts.bcc().expect("bcc is none"),
- )
- .unwrap();
- // TODO b/204938506 when we have a parser/verifier, check equivalence rather
- // than bit by bit equality.
- assert_eq!(latter, from_former);
- Ok(())
- })
-}
-
-#[test]
-fn sign_and_verify() {
- with_connection(|device| {
- let _signature = device
- .sign(&[], TEST_MESSAGE)
- .expect("Trying to call sign.");
-
- let _bcc = device
- .getAttestationChain(&[])
- .expect("Trying to call getAttestationChain.");
- // TODO b/204938506 check the signature with the bcc when the verifier is available.
- Ok(())
- })
-}
diff --git a/security/dice/aidl/vts/functional/utils.rs b/security/dice/aidl/vts/functional/utils.rs
deleted file mode 100644
index 4e6708e..0000000
--- a/security/dice/aidl/vts/functional/utils.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2021, The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-use android_hardware_security_dice::aidl::android::hardware::security::dice::IDiceDevice::IDiceDevice;
-use anyhow::Result;
-use binder::Strong;
-use keystore2_vintf::get_aidl_instances;
-use std::sync::Arc;
-
-static DICE_DEVICE_SERVICE_NAME: &str = &"android.hardware.security.dice";
-static DICE_DEVICE_INTERFACE_NAME: &str = &"IDiceDevice";
-
-/// This function iterates through all announced IDiceDevice services and runs the given test
-/// closure against connections to each of them. It also modifies the panic hook to indicate
-/// on which instance the test failed in case the test closure panics.
-pub fn with_connection<R, F>(test: F)
-where
- F: Fn(&Strong<dyn IDiceDevice>) -> Result<R>,
-{
- let instances = get_aidl_instances(DICE_DEVICE_SERVICE_NAME, 1, DICE_DEVICE_INTERFACE_NAME);
- let panic_hook = Arc::new(std::panic::take_hook());
- for i in instances.into_iter() {
- let panic_hook_clone = panic_hook.clone();
- let instance_clone = i.clone();
- std::panic::set_hook(Box::new(move |v| {
- println!("While testing instance: \"{}\"", instance_clone);
- panic_hook_clone(v)
- }));
- let connection: Strong<dyn IDiceDevice> = binder::get_interface(&format!(
- "{}.{}/{}",
- DICE_DEVICE_SERVICE_NAME, DICE_DEVICE_INTERFACE_NAME, i
- ))
- .unwrap();
- test(&connection).unwrap();
- drop(std::panic::take_hook());
- }
- // Cannot call unwrap here because the panic hook is not Debug.
- std::panic::set_hook(match Arc::try_unwrap(panic_hook) {
- Ok(hook) => hook,
- _ => panic!("Failed to unwrap and reset previous panic hook."),
- })
-}
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/Android.bp b/security/keymint/aidl/vts/functional/Android.bp
index 26e91bd..ed3ca74 100644
--- a/security/keymint/aidl/vts/functional/Android.bp
+++ b/security/keymint/aidl/vts/functional/Android.bp
@@ -35,9 +35,12 @@
"libbinder_ndk",
"libcrypto",
"libbase",
+ "libgatekeeper",
"packagemanager_aidl-cpp",
],
static_libs: [
+ "android.hardware.gatekeeper@1.0",
+ "android.hardware.gatekeeper-V1-ndk",
"android.hardware.security.rkp-V3-ndk",
"android.hardware.security.secureclock-V1-ndk",
"libcppbor_external",
@@ -59,6 +62,7 @@
],
srcs: [
"AttestKeyTest.cpp",
+ "AuthTest.cpp",
"DeviceUniqueAttestationTest.cpp",
"KeyBlobUpgradeTest.cpp",
"KeyMintTest.cpp",
diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
index cdcaaf3..8ffc179 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -106,7 +106,7 @@
// with any other key purpose, but the original VTS tests incorrectly did exactly that.
// This means that a device that launched prior to Android T (API level 33) may
// accept or even require KeyPurpose::SIGN too.
- if (property_get_int32("ro.board.first_api_level", 0) < 33) {
+ if (property_get_int32("ro.board.first_api_level", 0) < __ANDROID_API_T__) {
AuthorizationSet key_desc_plus_sign = key_desc;
key_desc_plus_sign.push_back(TAG_PURPOSE, KeyPurpose::SIGN);
@@ -142,11 +142,14 @@
return false;
}
- // Check if chipset has received a waiver allowing it to be launched with
- // Android S (or later) with Keymaster 4.0 in StrongBox
+ // Check if chipset has received a waiver allowing it to be launched with Android S or T with
+ // Keymaster 4.0 in StrongBox.
bool is_chipset_allowed_km4_strongbox(void) const {
std::array<char, PROPERTY_VALUE_MAX> buffer;
+ const int32_t first_api_level = property_get_int32("ro.board.first_api_level", 0);
+ if (first_api_level <= 0 || first_api_level > __ANDROID_API_T__) return false;
+
auto res = property_get("ro.vendor.qti.soc_model", buffer.data(), nullptr);
if (res <= 0) return false;
@@ -169,8 +172,9 @@
// allowing it to be launched with Android S (or later) with Keymaster 4.0
// in StrongBox
void check_skip_test(void) const {
- if (is_attest_key_feature_disabled() && is_strongbox_enabled() &&
- is_chipset_allowed_km4_strongbox()) {
+ // Check the chipset first as that doesn't require a round-trip to Package Manager.
+ if (is_chipset_allowed_km4_strongbox() && is_strongbox_enabled() &&
+ is_attest_key_feature_disabled()) {
GTEST_SKIP() << "Test is not applicable";
}
}
diff --git a/security/keymint/aidl/vts/functional/AuthTest.cpp b/security/keymint/aidl/vts/functional/AuthTest.cpp
new file mode 100644
index 0000000..78c88f4
--- /dev/null
+++ b/security/keymint/aidl/vts/functional/AuthTest.cpp
@@ -0,0 +1,412 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "keymint_1_test"
+#include <cutils/log.h>
+
+#include <iostream>
+#include <optional>
+
+#include "KeyMintAidlTestBase.h"
+
+#include <aidl/android/hardware/gatekeeper/GatekeeperEnrollResponse.h>
+#include <aidl/android/hardware/gatekeeper/GatekeeperVerifyResponse.h>
+#include <aidl/android/hardware/gatekeeper/IGatekeeper.h>
+#include <aidl/android/hardware/security/secureclock/ISecureClock.h>
+#include <android-base/logging.h>
+#include <android/binder_manager.h>
+
+using aidl::android::hardware::gatekeeper::GatekeeperEnrollResponse;
+using aidl::android::hardware::gatekeeper::GatekeeperVerifyResponse;
+using aidl::android::hardware::gatekeeper::IGatekeeper;
+using aidl::android::hardware::security::keymint::HardwareAuthToken;
+using aidl::android::hardware::security::secureclock::ISecureClock;
+
+#include <android/hardware/gatekeeper/1.0/IGatekeeper.h>
+#include <android/hardware/gatekeeper/1.0/types.h>
+#include <gatekeeper/password_handle.h> // for password_handle_t
+#include <hardware/hw_auth_token.h>
+
+using ::android::sp;
+using IHidlGatekeeper = ::android::hardware::gatekeeper::V1_0::IGatekeeper;
+using HidlGatekeeperResponse = ::android::hardware::gatekeeper::V1_0::GatekeeperResponse;
+using HidlGatekeeperStatusCode = ::android::hardware::gatekeeper::V1_0::GatekeeperStatusCode;
+
+namespace aidl::android::hardware::security::keymint::test {
+
+class AuthTest : public KeyMintAidlTestBase {
+ public:
+ void SetUp() {
+ KeyMintAidlTestBase::SetUp();
+
+ // Find the default Gatekeeper instance.
+ string gk_name = string(IGatekeeper::descriptor) + "/default";
+ if (AServiceManager_isDeclared(gk_name.c_str())) {
+ // Enroll a user with AIDL Gatekeeper.
+ ::ndk::SpAIBinder binder(AServiceManager_waitForService(gk_name.c_str()));
+ gk_ = IGatekeeper::fromBinder(binder);
+ } else {
+ // Prior to Android U, Gatekeeper was HIDL not AIDL and so may not be present.
+ // Try to enroll user with HIDL Gatekeeper instead.
+ string gk_name = "default";
+ hidl_gk_ = IHidlGatekeeper::getService(gk_name.c_str());
+ if (hidl_gk_ == nullptr) {
+ std::cerr << "No HIDL Gatekeeper instance for '" << gk_name << "' found.\n";
+ return;
+ }
+ std::cerr << "No AIDL Gatekeeper instance for '" << gk_name << "' found, using HIDL.\n";
+ }
+
+ // If the device needs timestamps, find the default ISecureClock instance.
+ if (timestamp_token_required_) {
+ string clock_name = string(ISecureClock::descriptor) + "/default";
+ if (AServiceManager_isDeclared(clock_name.c_str())) {
+ ::ndk::SpAIBinder binder(AServiceManager_waitForService(clock_name.c_str()));
+ clock_ = ISecureClock::fromBinder(binder);
+ } else {
+ std::cerr << "No ISecureClock instance for '" << clock_name << "' found.\n";
+ }
+ }
+
+ // Enroll a password for a user.
+ uid_ = 10001;
+ password_ = "correcthorsebatterystaple";
+ std::optional<GatekeeperEnrollResponse> rsp = doEnroll(password_);
+ ASSERT_TRUE(rsp.has_value());
+ sid_ = rsp->secureUserId;
+ handle_ = rsp->data;
+ }
+
+ void TearDown() {
+ if (gk_ == nullptr) return;
+ gk_->deleteUser(uid_);
+ }
+
+ bool GatekeeperAvailable() { return (gk_ != nullptr) || (hidl_gk_ != nullptr); }
+
+ std::optional<GatekeeperEnrollResponse> doEnroll(const std::vector<uint8_t>& newPwd,
+ const std::vector<uint8_t>& curHandle = {},
+ const std::vector<uint8_t>& curPwd = {}) {
+ if (gk_ != nullptr) {
+ while (true) {
+ GatekeeperEnrollResponse rsp;
+ Status status = gk_->enroll(uid_, curHandle, curPwd, newPwd, &rsp);
+ if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
+ status.getServiceSpecificError() == IGatekeeper::ERROR_RETRY_TIMEOUT) {
+ sleep(1);
+ continue;
+ }
+ if (status.isOk()) {
+ return std::move(rsp);
+ } else {
+ GTEST_LOG_(ERROR) << "doEnroll(AIDL) failed: " << status;
+ return std::nullopt;
+ }
+ }
+ } else if (hidl_gk_ != nullptr) {
+ while (true) {
+ HidlGatekeeperResponse rsp;
+ auto status = hidl_gk_->enroll(
+ uid_, curHandle, curPwd, newPwd,
+ [&rsp](const HidlGatekeeperResponse& cbRsp) { rsp = cbRsp; });
+ if (!status.isOk()) {
+ GTEST_LOG_(ERROR) << "doEnroll(HIDL) failed";
+ return std::nullopt;
+ }
+ if (rsp.code == HidlGatekeeperStatusCode::ERROR_RETRY_TIMEOUT) {
+ sleep(1);
+ continue;
+ }
+ if (rsp.code != HidlGatekeeperStatusCode::STATUS_OK) {
+ GTEST_LOG_(ERROR) << "doEnroll(HIDL) failed with " << int(rsp.code);
+ return std::nullopt;
+ }
+ // "Parse" the returned data to get at the secure user ID.
+ if (rsp.data.size() != sizeof(::gatekeeper::password_handle_t)) {
+ GTEST_LOG_(ERROR)
+ << "HAL returned password handle of invalid length " << rsp.data.size();
+ return std::nullopt;
+ }
+ const ::gatekeeper::password_handle_t* handle =
+ reinterpret_cast<const ::gatekeeper::password_handle_t*>(rsp.data.data());
+
+ // Translate HIDL response to look like an AIDL response.
+ GatekeeperEnrollResponse aidl_rsp;
+ aidl_rsp.statusCode = IGatekeeper::STATUS_OK;
+ aidl_rsp.data = rsp.data;
+ aidl_rsp.secureUserId = handle->user_id;
+ return aidl_rsp;
+ }
+ } else {
+ return std::nullopt;
+ }
+ }
+
+ std::optional<GatekeeperEnrollResponse> doEnroll(const string& newPwd,
+ const std::vector<uint8_t>& curHandle = {},
+ const string& curPwd = {}) {
+ return doEnroll(std::vector<uint8_t>(newPwd.begin(), newPwd.end()), curHandle,
+ std::vector<uint8_t>(curPwd.begin(), curPwd.end()));
+ }
+
+ std::optional<HardwareAuthToken> doVerify(uint64_t challenge,
+ const std::vector<uint8_t>& handle,
+ const std::vector<uint8_t>& pwd) {
+ if (gk_ != nullptr) {
+ while (true) {
+ GatekeeperVerifyResponse rsp;
+ Status status = gk_->verify(uid_, challenge, handle, pwd, &rsp);
+ if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
+ status.getServiceSpecificError() == IGatekeeper::ERROR_RETRY_TIMEOUT) {
+ sleep(1);
+ continue;
+ }
+ if (status.isOk()) {
+ return rsp.hardwareAuthToken;
+ } else {
+ GTEST_LOG_(ERROR) << "doVerify(AIDL) failed: " << status;
+ return std::nullopt;
+ }
+ }
+ } else if (hidl_gk_ != nullptr) {
+ while (true) {
+ HidlGatekeeperResponse rsp;
+ auto status = hidl_gk_->verify(
+ uid_, challenge, handle, pwd,
+ [&rsp](const HidlGatekeeperResponse& cbRsp) { rsp = cbRsp; });
+ if (!status.isOk()) {
+ GTEST_LOG_(ERROR) << "doVerify(HIDL) failed";
+ return std::nullopt;
+ }
+ if (rsp.code == HidlGatekeeperStatusCode::ERROR_RETRY_TIMEOUT) {
+ sleep(1);
+ continue;
+ }
+ if (rsp.code != HidlGatekeeperStatusCode::STATUS_OK) {
+ GTEST_LOG_(ERROR) << "doVerify(HIDL) failed with " << int(rsp.code);
+ return std::nullopt;
+ }
+ // "Parse" the returned data to get auth token contents.
+ if (rsp.data.size() != sizeof(hw_auth_token_t)) {
+ GTEST_LOG_(ERROR) << "Incorrect size of AuthToken payload.";
+ return std::nullopt;
+ }
+ const hw_auth_token_t* hwAuthToken =
+ reinterpret_cast<const hw_auth_token_t*>(rsp.data.data());
+ HardwareAuthToken authToken;
+ authToken.timestamp.milliSeconds = betoh64(hwAuthToken->timestamp);
+ authToken.challenge = hwAuthToken->challenge;
+ authToken.userId = hwAuthToken->user_id;
+ authToken.authenticatorId = hwAuthToken->authenticator_id;
+ authToken.authenticatorType = static_cast<HardwareAuthenticatorType>(
+ betoh32(hwAuthToken->authenticator_type));
+ authToken.mac.assign(&hwAuthToken->hmac[0], &hwAuthToken->hmac[32]);
+ return authToken;
+ }
+ } else {
+ return std::nullopt;
+ }
+ }
+ std::optional<HardwareAuthToken> doVerify(uint64_t challenge,
+ const std::vector<uint8_t>& handle,
+ const string& pwd) {
+ return doVerify(challenge, handle, std::vector<uint8_t>(pwd.begin(), pwd.end()));
+ }
+
+ // Variants of the base class methods but with authentication information included.
+ string ProcessMessage(const vector<uint8_t>& key_blob, KeyPurpose operation,
+ const string& message, const AuthorizationSet& in_params,
+ AuthorizationSet* out_params, const HardwareAuthToken& hat) {
+ AuthorizationSet begin_out_params;
+ ErrorCode result = Begin(operation, key_blob, in_params, out_params, hat);
+ EXPECT_EQ(ErrorCode::OK, result);
+ if (result != ErrorCode::OK) {
+ return "";
+ }
+
+ std::optional<secureclock::TimeStampToken> time_token = std::nullopt;
+ if (timestamp_token_required_ && clock_ != nullptr) {
+ // Ask a secure clock instance for a timestamp, including the per-op challenge.
+ secureclock::TimeStampToken token;
+ EXPECT_EQ(ErrorCode::OK,
+ GetReturnErrorCode(clock_->generateTimeStamp(challenge_, &token)));
+ time_token = token;
+ }
+
+ string output;
+ EXPECT_EQ(ErrorCode::OK, Finish(message, {} /* signature */, &output, hat, time_token));
+ return output;
+ }
+
+ string EncryptMessage(const vector<uint8_t>& key_blob, const string& message,
+ const AuthorizationSet& in_params, AuthorizationSet* out_params,
+ const HardwareAuthToken& hat) {
+ SCOPED_TRACE("EncryptMessage");
+ return ProcessMessage(key_blob, KeyPurpose::ENCRYPT, message, in_params, out_params, hat);
+ }
+
+ string DecryptMessage(const vector<uint8_t>& key_blob, const string& ciphertext,
+ const AuthorizationSet& params, const HardwareAuthToken& hat) {
+ SCOPED_TRACE("DecryptMessage");
+ AuthorizationSet out_params;
+ string plaintext =
+ ProcessMessage(key_blob, KeyPurpose::DECRYPT, ciphertext, params, &out_params, hat);
+ EXPECT_TRUE(out_params.empty());
+ return plaintext;
+ }
+
+ protected:
+ std::shared_ptr<IGatekeeper> gk_;
+ sp<IHidlGatekeeper> hidl_gk_;
+ std::shared_ptr<ISecureClock> clock_;
+ string password_;
+ uint32_t uid_;
+ int64_t sid_;
+ std::vector<uint8_t> handle_;
+};
+
+// Test use of a key that requires user-authentication within recent history.
+TEST_P(AuthTest, TimeoutAuthentication) {
+ if (!GatekeeperAvailable()) {
+ GTEST_SKIP() << "No Gatekeeper available";
+ }
+ if (timestamp_token_required_ && clock_ == nullptr) {
+ GTEST_SKIP() << "Device requires timestamps and no ISecureClock available";
+ }
+
+ // Create an AES key that requires authentication within the last 3 seconds.
+ const uint32_t timeout_secs = 3;
+ auto builder = AuthorizationSetBuilder()
+ .AesEncryptionKey(256)
+ .BlockMode(BlockMode::ECB)
+ .Padding(PaddingMode::PKCS7)
+ .Authorization(TAG_USER_SECURE_ID, sid_)
+ .Authorization(TAG_USER_AUTH_TYPE, HardwareAuthenticatorType::PASSWORD)
+ .Authorization(TAG_AUTH_TIMEOUT, timeout_secs);
+ vector<uint8_t> keyblob;
+ vector<KeyCharacteristics> key_characteristics;
+ vector<Certificate> cert_chain;
+ ASSERT_EQ(ErrorCode::OK,
+ GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain));
+
+ // Attempt to use the AES key without authentication.
+ const string message = "Hello World!";
+ AuthorizationSet out_params;
+ auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params));
+
+ // Verify to get a HAT, arbitrary challenge.
+ const uint64_t challenge = 42;
+ const std::optional<HardwareAuthToken> hat = doVerify(challenge, handle_, password_);
+ ASSERT_TRUE(hat.has_value());
+ EXPECT_EQ(hat->userId, sid_);
+
+ // Adding the auth token makes it possible to use the AES key.
+ const string ciphertext = EncryptMessage(keyblob, message, params, &out_params, hat.value());
+ const string plaintext = DecryptMessage(keyblob, ciphertext, params, hat.value());
+ EXPECT_EQ(message, plaintext);
+
+ // Altering a single bit in the MAC means no auth.
+ HardwareAuthToken dodgy_hat = hat.value();
+ ASSERT_GT(dodgy_hat.mac.size(), 0);
+ dodgy_hat.mac[0] ^= 0x01;
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params, dodgy_hat));
+
+ // Wait for long enough that the hardware auth token expires.
+ sleep(timeout_secs + 1);
+ if (!timestamp_token_required_) {
+ // KeyMint implementation has its own clock, and can immediately detect timeout.
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params, hat));
+ } else {
+ // KeyMint implementation has no clock, so only detects timeout via timestamp token provided
+ // on update()/finish().
+ ASSERT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params, hat));
+ secureclock::TimeStampToken time_token;
+ EXPECT_EQ(ErrorCode::OK,
+ GetReturnErrorCode(clock_->generateTimeStamp(challenge_, &time_token)));
+
+ string output;
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Finish(message, {} /* signature */, &output, hat, time_token));
+ }
+}
+
+// Test use of a key that requires an auth token for each action on the operation, with
+// a per-operation challenge value included.
+TEST_P(AuthTest, AuthPerOperation) {
+ if (!GatekeeperAvailable()) {
+ GTEST_SKIP() << "No Gatekeeper available";
+ }
+
+ // Create an AES key that requires authentication per-action.
+ auto builder = AuthorizationSetBuilder()
+ .AesEncryptionKey(256)
+ .BlockMode(BlockMode::ECB)
+ .Padding(PaddingMode::PKCS7)
+ .Authorization(TAG_USER_SECURE_ID, sid_)
+ .Authorization(TAG_USER_AUTH_TYPE, HardwareAuthenticatorType::PASSWORD);
+ vector<uint8_t> keyblob;
+ vector<KeyCharacteristics> key_characteristics;
+ vector<Certificate> cert_chain;
+ ASSERT_EQ(ErrorCode::OK,
+ GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain));
+
+ // Attempt to use the AES key without authentication fails after begin.
+ const string message = "Hello World!";
+ AuthorizationSet out_params;
+ auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+ EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params));
+ string output;
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED, Finish(message, {} /* signature */, &output));
+
+ // Verify to get a HAT, but with an arbitrary challenge.
+ const uint64_t unrelated_challenge = 42;
+ const std::optional<HardwareAuthToken> unrelated_hat =
+ doVerify(unrelated_challenge, handle_, password_);
+ ASSERT_TRUE(unrelated_hat.has_value());
+ EXPECT_EQ(unrelated_hat->userId, sid_);
+
+ // Attempt to use the AES key with an unrelated authentication fails after begin.
+ EXPECT_EQ(ErrorCode::OK,
+ Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params, unrelated_hat.value()));
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Finish(message, {} /* signature */, &output, unrelated_hat.value()));
+
+ // Now get a HAT with the challenge from an in-progress operation.
+ EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params));
+ const std::optional<HardwareAuthToken> hat = doVerify(challenge_, handle_, password_);
+ ASSERT_TRUE(hat.has_value());
+ EXPECT_EQ(hat->userId, sid_);
+ string ciphertext;
+ EXPECT_EQ(ErrorCode::OK, Finish(message, {} /* signature */, &ciphertext, hat.value()));
+
+ // Altering a single bit in the MAC means no auth.
+ EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params));
+ std::optional<HardwareAuthToken> dodgy_hat = doVerify(challenge_, handle_, password_);
+ ASSERT_TRUE(dodgy_hat.has_value());
+ EXPECT_EQ(dodgy_hat->userId, sid_);
+ ASSERT_GT(dodgy_hat->mac.size(), 0);
+ dodgy_hat->mac[0] ^= 0x01;
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Finish(message, {} /* signature */, &ciphertext, hat.value()));
+}
+
+INSTANTIATE_KEYMINT_AIDL_TEST(AuthTest);
+
+} // namespace aidl::android::hardware::security::keymint::test
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 41d47ee..5e27bd0 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -108,25 +108,13 @@
return true;
}
-// Extract attestation record from cert. Returned object is still part of cert; don't free it
-// separately.
-ASN1_OCTET_STRING* get_attestation_record(X509* certificate) {
- ASN1_OBJECT_Ptr oid(OBJ_txt2obj(kAttestionRecordOid, 1 /* dotted string format */));
- EXPECT_TRUE(!!oid.get());
- if (!oid.get()) return nullptr;
+void check_crl_distribution_points_extension_not_present(X509* certificate) {
+ ASN1_OBJECT_Ptr crl_dp_oid(OBJ_txt2obj(kCrlDPOid, 1 /* dotted string format */));
+ ASSERT_TRUE(crl_dp_oid.get());
- int location = X509_get_ext_by_OBJ(certificate, oid.get(), -1 /* search from beginning */);
- EXPECT_NE(-1, location) << "Attestation extension not found in certificate";
- if (location == -1) return nullptr;
-
- X509_EXTENSION* attest_rec_ext = X509_get_ext(certificate, location);
- EXPECT_TRUE(!!attest_rec_ext)
- << "Found attestation extension but couldn't retrieve it? Probably a BoringSSL bug.";
- if (!attest_rec_ext) return nullptr;
-
- ASN1_OCTET_STRING* attest_rec = X509_EXTENSION_get_data(attest_rec_ext);
- EXPECT_TRUE(!!attest_rec) << "Attestation extension contained no data";
- return attest_rec;
+ int location =
+ X509_get_ext_by_OBJ(certificate, crl_dp_oid.get(), -1 /* search from beginning */);
+ ASSERT_EQ(location, -1);
}
void check_attestation_version(uint32_t attestation_version, int32_t aidl_version) {
@@ -214,7 +202,7 @@
* which is mandatory for KeyMint version 2 or first_api_level 33 or greater.
*/
bool KeyMintAidlTestBase::isDeviceIdAttestationRequired() {
- return AidlVersion() >= 2 || property_get_int32("ro.vendor.api_level", 0) >= 33;
+ return AidlVersion() >= 2 || property_get_int32("ro.vendor.api_level", 0) >= __ANDROID_API_T__;
}
/**
@@ -222,7 +210,7 @@
* which is supported for KeyMint version 3 or first_api_level greater than 33.
*/
bool KeyMintAidlTestBase::isSecondImeiIdAttestationRequired() {
- return AidlVersion() >= 3 && property_get_int32("ro.vendor.api_level", 0) > 33;
+ return AidlVersion() >= 3 && property_get_int32("ro.vendor.api_level", 0) > __ANDROID_API_T__;
}
bool KeyMintAidlTestBase::Curve25519Supported() {
@@ -552,12 +540,13 @@
ErrorCode KeyMintAidlTestBase::Begin(KeyPurpose purpose, const vector<uint8_t>& key_blob,
const AuthorizationSet& in_params,
- AuthorizationSet* out_params) {
+ AuthorizationSet* out_params,
+ std::optional<HardwareAuthToken> hat) {
SCOPED_TRACE("Begin");
Status result;
BeginResult out;
- result = keymint_->begin(purpose, key_blob, in_params.vector_data(), std::nullopt, &out);
+ result = keymint_->begin(purpose, key_blob, in_params.vector_data(), hat, &out);
if (result.isOk()) {
*out_params = out.params;
@@ -611,8 +600,9 @@
return GetReturnErrorCode(result);
}
-ErrorCode KeyMintAidlTestBase::Finish(const string& input, const string& signature,
- string* output) {
+ErrorCode KeyMintAidlTestBase::Finish(const string& input, const string& signature, string* output,
+ std::optional<HardwareAuthToken> hat,
+ std::optional<secureclock::TimeStampToken> time_token) {
SCOPED_TRACE("Finish");
Status result;
@@ -621,8 +611,8 @@
vector<uint8_t> oPut;
result = op_->finish(vector<uint8_t>(input.begin(), input.end()),
- vector<uint8_t>(signature.begin(), signature.end()), {} /* authToken */,
- {} /* timestampToken */, {} /* confirmationToken */, &oPut);
+ vector<uint8_t>(signature.begin(), signature.end()), hat, time_token,
+ {} /* confirmationToken */, &oPut);
if (result.isOk()) output->append(oPut.begin(), oPut.end());
@@ -845,7 +835,7 @@
int vendor_api_level = property_get_int32("ro.vendor.api_level", 0);
if (SecLevel() == SecurityLevel::STRONGBOX) {
// This is known to be broken on older vendor implementations.
- if (vendor_api_level < 33) {
+ if (vendor_api_level < __ANDROID_API_T__) {
compare_output = false;
} else {
additional_information = " (b/194134359) ";
@@ -1302,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:
@@ -1709,6 +1712,10 @@
EXPECT_TRUE(!!cert.get());
if (!cert.get()) return false;
+ // Make sure CRL Distribution Points extension is not present in a certificate
+ // containing attestation record.
+ check_crl_distribution_points_extension_not_present(cert.get());
+
ASN1_OCTET_STRING* attest_rec = get_attestation_record(cert.get());
EXPECT_TRUE(!!attest_rec);
if (!attest_rec) return false;
@@ -1899,6 +1906,27 @@
return X509_Ptr(d2i_X509(nullptr /* allocate new */, &p, blob.size()));
}
+// Extract attestation record from cert. Returned object is still part of cert; don't free it
+// separately.
+ASN1_OCTET_STRING* get_attestation_record(X509* certificate) {
+ ASN1_OBJECT_Ptr oid(OBJ_txt2obj(kAttestionRecordOid, 1 /* dotted string format */));
+ EXPECT_TRUE(!!oid.get());
+ if (!oid.get()) return nullptr;
+
+ int location = X509_get_ext_by_OBJ(certificate, oid.get(), -1 /* search from beginning */);
+ EXPECT_NE(-1, location) << "Attestation extension not found in certificate";
+ if (location == -1) return nullptr;
+
+ X509_EXTENSION* attest_rec_ext = X509_get_ext(certificate, location);
+ EXPECT_TRUE(!!attest_rec_ext)
+ << "Found attestation extension but couldn't retrieve it? Probably a BoringSSL bug.";
+ if (!attest_rec_ext) return nullptr;
+
+ ASN1_OCTET_STRING* attest_rec = X509_EXTENSION_get_data(attest_rec_ext);
+ EXPECT_TRUE(!!attest_rec) << "Attestation extension contained no data";
+ return attest_rec;
+}
+
vector<uint8_t> make_name_from_str(const string& name) {
X509_NAME_Ptr x509_name(X509_NAME_new());
EXPECT_TRUE(x509_name.get() != nullptr);
@@ -2043,7 +2071,7 @@
}
void device_id_attestation_vsr_check(const ErrorCode& result) {
- if (get_vsr_api_level() >= 34) {
+ if (get_vsr_api_level() > __ANDROID_API_T__) {
ASSERT_FALSE(result == ErrorCode::INVALID_TAG)
<< "It is a specification violation for INVALID_TAG to be returned due to ID "
<< "mismatch in a Device ID Attestation call. INVALID_TAG is only intended to "
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
index 7c11b95..3245ca9 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
@@ -161,7 +161,8 @@
const AuthorizationSet& in_params, AuthorizationSet* out_params,
std::shared_ptr<IKeyMintOperation>& op);
ErrorCode Begin(KeyPurpose purpose, const vector<uint8_t>& key_blob,
- const AuthorizationSet& in_params, AuthorizationSet* out_params);
+ const AuthorizationSet& in_params, AuthorizationSet* out_params,
+ std::optional<HardwareAuthToken> hat = std::nullopt);
ErrorCode Begin(KeyPurpose purpose, const AuthorizationSet& in_params,
AuthorizationSet* out_params);
ErrorCode Begin(KeyPurpose purpose, const AuthorizationSet& in_params);
@@ -169,7 +170,9 @@
ErrorCode UpdateAad(const string& input);
ErrorCode Update(const string& input, string* output);
- ErrorCode Finish(const string& message, const string& signature, string* output);
+ ErrorCode Finish(const string& message, const string& signature, string* output,
+ std::optional<HardwareAuthToken> hat = std::nullopt,
+ std::optional<secureclock::TimeStampToken> time_token = std::nullopt);
ErrorCode Finish(const string& message, string* output) {
return Finish(message, {} /* signature */, output);
}
@@ -306,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);
@@ -353,7 +357,7 @@
SecurityLevel securityLevel_;
string name_;
string author_;
- long challenge_;
+ int64_t challenge_;
private:
void CheckEncryptOneByteAtATime(BlockMode block_mode, const int block_size,
@@ -398,6 +402,7 @@
string bin2hex(const vector<uint8_t>& data);
X509_Ptr parse_cert_blob(const vector<uint8_t>& blob);
+ASN1_OCTET_STRING* get_attestation_record(X509* certificate);
vector<uint8_t> make_name_from_str(const string& name);
void check_maced_pubkey(const MacedPublicKey& macedPubKey, bool testMode,
vector<uint8_t>* payload_value);
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index 357405f..c6b8906 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -1136,8 +1136,8 @@
* that has been generated using an associate IRemotelyProvisionedComponent.
*/
TEST_P(NewKeyGenerationTest, RsaWithRkpAttestation) {
- if (get_vsr_api_level() < 32 || 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
@@ -1214,8 +1214,8 @@
* that has been generated using an associate IRemotelyProvisionedComponent.
*/
TEST_P(NewKeyGenerationTest, EcdsaWithRkpAttestation) {
- if (get_vsr_api_level() <= 32 || 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
@@ -8629,7 +8629,7 @@
TEST_P(VsrRequirementTest, Vsr13Test) {
int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < 33) {
+ if (vsr_api_level < __ANDROID_API_T__) {
GTEST_SKIP() << "Applies only to VSR API level 33, this device is: " << vsr_api_level;
}
EXPECT_GE(AidlVersion(), 2) << "VSR 13+ requires KeyMint version 2";
@@ -8637,7 +8637,7 @@
TEST_P(VsrRequirementTest, Vsr14Test) {
int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < 34) {
+ if (vsr_api_level < __ANDROID_API_U__) {
GTEST_SKIP() << "Applies only to VSR API level 34, this device is: " << vsr_api_level;
}
EXPECT_GE(AidlVersion(), 3) << "VSR 14+ requires KeyMint version 3";
diff --git a/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp b/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp
index 0c61c25..49fd0c9 100644
--- a/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp
+++ b/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp
@@ -68,7 +68,7 @@
int getError() { return static_cast<int>(error_); }
- const string& GenerateMessage(int size) {
+ const string GenerateMessage(int size) {
for (const string& message : message_cache_) {
if (message.size() == size) {
return message;
@@ -76,7 +76,7 @@
}
string message = string(size, 'x');
message_cache_.push_back(message);
- return std::move(message);
+ return message;
}
optional<BlockMode> getBlockMode(string transform) {
diff --git a/security/keymint/support/include/keymint_support/attestation_record.h b/security/keymint/support/include/keymint_support/attestation_record.h
index bc76c93..f280f48 100644
--- a/security/keymint/support/include/keymint_support/attestation_record.h
+++ b/security/keymint/support/include/keymint_support/attestation_record.h
@@ -43,6 +43,8 @@
*/
static const char kAttestionRecordOid[] = "1.3.6.1.4.1.11129.2.1.17";
+static const char kCrlDPOid[] = "2.5.29.31"; // Standard CRL Distribution Points extension.
+
enum class VerifiedBoot : uint8_t {
VERIFIED = 0,
SELF_SIGNED = 1,
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index 9620b6a..086ee79 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -290,11 +290,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) {
@@ -569,7 +570,7 @@
}
// BCC is [ pubkey, + BccEntry]
- auto bccContents = validateBcc(bcc->asArray());
+ auto bccContents = validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kProtectedData);
if (!bccContents) {
return bccContents.message() + "\n" + prettyPrint(bcc.get());
}
@@ -805,8 +806,8 @@
return "Challenge must be a Bstr.";
}
- if (challenge.size() < 32 || challenge.size() > 64) {
- return "Challenge size must be between 32 and 64 bytes inclusive. "
+ if (challenge.size() < 16 || challenge.size() > 64) {
+ return "Challenge size must be between 16 and 64 bytes inclusive. "
"However, challenge is " +
std::to_string(challenge.size()) + " bytes long.";
}
@@ -859,8 +860,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::kAuthenticatedMessage);
if (!diceContents) {
return diceContents.message() + "\n" + prettyPrint(diceCertChain);
}
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..bd27882 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
+ * "system_patch_level" : uint, ; YYYYMM
* "boot_patch_level" : uint, ; YYYYMMDD
* "vendor_patch_level" : uint, ; YYYYMMDD
* "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
+ * "boot_patch_level" : uint, ; YYYYMMDD
+ * "vendor_patch_level" : uint, ; YYYYMMDD
+ * "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
+ * ? "boot_patch_level" : uint, ; YYYYMMDD
+ * ? "vendor_patch_level" : uint, ; YYYYMMDD
+ * "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 5bd2145..35b83dd 100644
--- a/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
+++ b/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
@@ -315,7 +315,7 @@
*
* @param in challenge contains a byte string from the provisioning server which will be
* included in the signed data of the CSR structure. Different provisioned backends may
- * use different semantic data for this field, but the supported sizes must be between 32
+ * use different semantic data for this field, but the supported sizes must be between 16
* and 64 bytes, inclusive.
*
* @return the following CBOR Certificate Signing Request (Csr) serialized into a byte array:
diff --git a/security/rkp/aidl/lint-baseline.xml b/security/rkp/aidl/lint-baseline.xml
new file mode 100644
index 0000000..d25d383
--- /dev/null
+++ b/security/rkp/aidl/lint-baseline.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.0.0-dev" type="baseline" dependencies="true" variant="all" version="8.0.0-dev">
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 34 (current min is 33): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/security/rkp/aidl/android.hardware.security.rkp-V1-java-source/gen/android/hardware/security/keymint/IRemotelyProvisionedComponent.java"
+ line="50"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 34 (current min is 33): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/security/rkp/aidl/android.hardware.security.rkp-V2-java-source/gen/android/hardware/security/keymint/IRemotelyProvisionedComponent.java"
+ line="50"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 34 (current min is 33): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/security/rkp/aidl/android.hardware.security.rkp-V3-java-source/gen/android/hardware/security/keymint/IRemotelyProvisionedComponent.java"
+ line="495"
+ column="12"/>
+ </issue>
+
+</issues>
\ No newline at end of file
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index 573f10b..bf40976 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -23,6 +23,7 @@
#include <aidl/android/hardware/security/keymint/SecurityLevel.h>
#include <android/binder_manager.h>
#include <binder/IServiceManager.h>
+#include <cppbor.h>
#include <cppbor_parse.h>
#include <gmock/gmock.h>
#include <keymaster/cppcose/cppcose.h>
@@ -797,6 +798,128 @@
BnRemotelyProvisionedComponent::STATUS_TEST_KEY_IN_PRODUCTION_REQUEST);
}
+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) {
+ X509_Ptr cert(parse_cert_blob(attestation_cert));
+ ASSERT_TRUE(cert.get());
+
+ ASN1_OCTET_STRING* attest_rec = get_attestation_record(cert.get());
+ ASSERT_TRUE(attest_rec);
+
+ auto error = parse_root_of_trust(attest_rec->data, attest_rec->length, verified_boot_key,
+ verified_boot_state, device_locked, verified_boot_hash);
+ ASSERT_EQ(error, ErrorCode::OK);
+}
+
+/**
+ * Generate a CSR and verify DeviceInfo against IDs attested by KeyMint.
+ */
+TEST_P(CertificateRequestV2Test, DeviceInfo) {
+ // See if there is a matching IKeyMintDevice for this IRemotelyProvisionedComponent.
+ std::shared_ptr<IKeyMintDevice> keyMint;
+ if (!matching_keymint_device(GetParam(), &keyMint)) {
+ // No matching IKeyMintDevice.
+ GTEST_SKIP() << "Skipping key use test as no matching KeyMint device found";
+ return;
+ }
+ KeyMintHardwareInfo info;
+ ASSERT_TRUE(keyMint->getHardwareInfo(&info).isOk());
+
+ // Get IDs attested by KeyMint.
+ MacedPublicKey macedPubKey;
+ bytevec privateKeyBlob;
+ auto irpcStatus =
+ provisionable_->generateEcdsaP256KeyPair(false, &macedPubKey, &privateKeyBlob);
+ ASSERT_TRUE(irpcStatus.isOk());
+
+ AttestationKey attestKey;
+ attestKey.keyBlob = std::move(privateKeyBlob);
+ attestKey.issuerSubjectName = make_name_from_str("Android Keystore Key");
+
+ // Generate an ECDSA key that is attested by the generated P256 keypair.
+ AuthorizationSet keyDesc = AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .EcdsaSigningKey(EcCurve::P_256)
+ .AttestationChallenge("foo")
+ .AttestationApplicationId("bar")
+ .Digest(Digest::NONE)
+ .SetDefaultValidity();
+ KeyCreationResult creationResult;
+ auto kmStatus = keyMint->generateKey(keyDesc.vector_data(), attestKey, &creationResult);
+ ASSERT_TRUE(kmStatus.isOk());
+
+ vector<KeyCharacteristics> key_characteristics = std::move(creationResult.keyCharacteristics);
+ vector<Certificate> key_cert_chain = std::move(creationResult.certificateChain);
+ // We didn't provision the attestation key.
+ ASSERT_EQ(key_cert_chain.size(), 1);
+
+ // Parse attested patch levels.
+ auto auths = HwEnforcedAuthorizations(key_characteristics);
+
+ auto attestedSystemPatchLevel = auths.GetTagValue(TAG_OS_PATCHLEVEL);
+ auto attestedVendorPatchLevel = auths.GetTagValue(TAG_VENDOR_PATCHLEVEL);
+ auto attestedBootPatchLevel = auths.GetTagValue(TAG_BOOT_PATCHLEVEL);
+
+ ASSERT_TRUE(attestedSystemPatchLevel.has_value());
+ ASSERT_TRUE(attestedVendorPatchLevel.has_value());
+ ASSERT_TRUE(attestedBootPatchLevel.has_value());
+
+ // Parse attested AVB values.
+ vector<uint8_t> key;
+ VerifiedBoot attestedVbState;
+ bool attestedBootloaderState;
+ vector<uint8_t> attestedVbmetaDigest;
+ parse_root_of_trust(key_cert_chain[0].encodedCertificate, &key, &attestedVbState,
+ &attestedBootloaderState, &attestedVbmetaDigest);
+
+ // Get IDs from DeviceInfo.
+ bytevec csr;
+ irpcStatus =
+ provisionable_->generateCertificateRequestV2({} /* keysToSign */, challenge_, &csr);
+ ASSERT_TRUE(irpcStatus.isOk()) << irpcStatus.getMessage();
+
+ auto result = verifyProductionCsr(cppbor::Array(), csr, provisionable_.get(), challenge_);
+ ASSERT_TRUE(result) << result.message();
+
+ std::unique_ptr<cppbor::Array> csrPayload = std::move(*result);
+ ASSERT_TRUE(csrPayload);
+
+ auto deviceInfo = csrPayload->get(2)->asMap();
+ ASSERT_TRUE(deviceInfo);
+
+ auto vbState = deviceInfo->get("vb_state")->asTstr();
+ auto bootloaderState = deviceInfo->get("bootloader_state")->asTstr();
+ auto vbmetaDigest = deviceInfo->get("vbmeta_digest")->asBstr();
+ auto systemPatchLevel = deviceInfo->get("system_patch_level")->asUint();
+ auto vendorPatchLevel = deviceInfo->get("vendor_patch_level")->asUint();
+ auto bootPatchLevel = deviceInfo->get("boot_patch_level")->asUint();
+ auto securityLevel = deviceInfo->get("security_level")->asTstr();
+
+ ASSERT_TRUE(vbState);
+ ASSERT_TRUE(bootloaderState);
+ ASSERT_TRUE(vbmetaDigest);
+ ASSERT_TRUE(systemPatchLevel);
+ ASSERT_TRUE(vendorPatchLevel);
+ ASSERT_TRUE(bootPatchLevel);
+ ASSERT_TRUE(securityLevel);
+
+ auto kmDeviceName = device_suffix(GetParam());
+
+ // Compare DeviceInfo against IDs attested by KeyMint.
+ ASSERT_TRUE((securityLevel->value() == "tee" && kmDeviceName == "default") ||
+ (securityLevel->value() == "strongbox" && kmDeviceName == "strongbox"));
+ ASSERT_TRUE((vbState->value() == "green" && attestedVbState == VerifiedBoot::VERIFIED) ||
+ (vbState->value() == "yellow" && attestedVbState == VerifiedBoot::SELF_SIGNED) ||
+ (vbState->value() == "orange" && attestedVbState == VerifiedBoot::UNVERIFIED));
+ ASSERT_TRUE((bootloaderState->value() == "locked" && attestedBootloaderState) ||
+ (bootloaderState->value() == "unlocked" && !attestedBootloaderState));
+ ASSERT_EQ(vbmetaDigest->value(), attestedVbmetaDigest);
+ ASSERT_EQ(systemPatchLevel->value(), attestedSystemPatchLevel.value());
+ ASSERT_EQ(vendorPatchLevel->value(), attestedVendorPatchLevel.value());
+ ASSERT_EQ(bootPatchLevel->value(), attestedBootPatchLevel.value());
+}
+
INSTANTIATE_REM_PROV_AIDL_TEST(CertificateRequestV2Test);
using VsrRequirementTest = VtsRemotelyProvisionedComponentTests;
diff --git a/sensors/1.0/vts/functional/SensorsHidlEnvironmentV1_0.h b/sensors/1.0/vts/functional/SensorsHidlEnvironmentV1_0.h
index b802e6c..a4e4457 100644
--- a/sensors/1.0/vts/functional/SensorsHidlEnvironmentV1_0.h
+++ b/sensors/1.0/vts/functional/SensorsHidlEnvironmentV1_0.h
@@ -46,8 +46,6 @@
bool resetHal() override;
void startPollingThread() override;
static void pollingThread(SensorsHidlEnvironmentV1_0* env, std::atomic_bool& stop);
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SensorsHidlEnvironmentV1_0);
};
#endif // ANDROID_SENSORS_HIDL_ENVIRONMENT_V1_0_H
\ No newline at end of file
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/SensorsAidlEnvironment.h b/sensors/aidl/vts/SensorsAidlEnvironment.h
index 2f5f287..a852e91 100644
--- a/sensors/aidl/vts/SensorsAidlEnvironment.h
+++ b/sensors/aidl/vts/SensorsAidlEnvironment.h
@@ -69,8 +69,6 @@
*/
void readEvents();
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SensorsAidlEnvironment);
-
/**
* Pointer to the Sensors HAL Interface that allows the test to call HAL functions.
*/
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/vts/2_X/SensorsHidlEnvironmentV2_X.h b/sensors/common/vts/2_X/SensorsHidlEnvironmentV2_X.h
index 5fe4d8b..796de2f 100644
--- a/sensors/common/vts/2_X/SensorsHidlEnvironmentV2_X.h
+++ b/sensors/common/vts/2_X/SensorsHidlEnvironmentV2_X.h
@@ -79,8 +79,6 @@
*/
void readEvents();
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SensorsHidlEnvironmentV2_X);
-
/**
* Pointer to the Sensors HAL Interface that allows the test to call HAL functions.
*/
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/sensors/common/vts/utils/include/sensors-vts-utils/SensorsHidlTestBase.h b/sensors/common/vts/utils/include/sensors-vts-utils/SensorsHidlTestBase.h
index f2c92ae..ec7c906 100644
--- a/sensors/common/vts/utils/include/sensors-vts-utils/SensorsHidlTestBase.h
+++ b/sensors/common/vts/utils/include/sensors-vts-utils/SensorsHidlTestBase.h
@@ -225,7 +225,9 @@
ASSERT_EQ(batch(handle, samplingPeriodInNs, batchingPeriodInNs), Result::OK);
ASSERT_EQ(activate(handle, 1), Result::OK);
- events = getEnvironment()->collectEvents(minTimeUs, minNEvent, true /*clearBeforeStart*/);
+ events = getEnvironment()->collectEvents(
+ minTimeUs, minNEvent, true /* clearBeforeStart */, true /* changeCollection */,
+ [&type](const EventType& event) { return event.sensorType == type; });
ASSERT_EQ(activate(handle, 0), Result::OK);
ALOGI("Collected %zu samples", events.size());
@@ -233,24 +235,14 @@
ASSERT_GT(events.size(), 0u);
bool handleMismatchReported = false;
- bool metaSensorTypeErrorReported = false;
for (auto& e : events) {
- if (e.sensorType == type) {
- // avoid generating hundreds of error
- if (!handleMismatchReported) {
- EXPECT_EQ(e.sensorHandle, handle)
- << (handleMismatchReported = true,
- "Event of the same type must come from the sensor registered");
- }
- sensorEvents.push_back(e);
- } else {
- // avoid generating hundreds of error
- if (!metaSensorTypeErrorReported) {
- EXPECT_TRUE(isMetaSensorType(e.sensorType))
- << (metaSensorTypeErrorReported = true,
- "Only meta types are allowed besides the type registered");
- }
+ // avoid generating hundreds of error
+ if (!handleMismatchReported) {
+ EXPECT_EQ(e.sensorHandle, handle)
+ << (handleMismatchReported = true,
+ "Event of the same type must come from the sensor registered");
}
+ sensorEvents.push_back(e);
}
std::string s;
diff --git a/sensors/common/vts/utils/include/sensors-vts-utils/SensorsVtsEnvironmentBase.h b/sensors/common/vts/utils/include/sensors-vts-utils/SensorsVtsEnvironmentBase.h
index 17a96ed..c061a75 100644
--- a/sensors/common/vts/utils/include/sensors-vts-utils/SensorsVtsEnvironmentBase.h
+++ b/sensors/common/vts/utils/include/sensors-vts-utils/SensorsVtsEnvironmentBase.h
@@ -20,6 +20,7 @@
#include <gtest/gtest.h>
#include <atomic>
+#include <functional>
#include <memory>
#include <mutex>
#include <thread>
@@ -61,9 +62,16 @@
}
// set sensor event collection status
- void setCollection(bool enable) {
+ void setCollection(bool enable, const std::optional<std::function<bool(const Event&)>>& filter =
+ std::nullopt) {
std::lock_guard<std::mutex> lock(mEventsMutex);
mCollectionEnabled = enable;
+
+ if (enable && filter.has_value()) {
+ mEventFilter = *filter;
+ } else {
+ mEventFilter.reset();
+ }
}
void registerCallback(IEventCallback<Event>* callback) {
@@ -76,8 +84,10 @@
mCallback = nullptr;
}
- std::vector<Event> collectEvents(useconds_t timeLimitUs, size_t nEventLimit,
- bool clearBeforeStart = true, bool changeCollection = true) {
+ std::vector<Event> collectEvents(
+ useconds_t timeLimitUs, size_t nEventLimit, bool clearBeforeStart = true,
+ bool changeCollection = true,
+ const std::optional<std::function<bool(const Event&)>>& filter = std::nullopt) {
std::vector<Event> events;
constexpr useconds_t SLEEP_GRANULARITY = 100 * 1000; // granularity 100 ms
@@ -85,7 +95,7 @@
clearBeforeStart);
if (changeCollection) {
- setCollection(true);
+ setCollection(true, filter);
}
if (clearBeforeStart) {
catEvents(nullptr);
@@ -115,11 +125,13 @@
: mCollectionEnabled(false), mCallback(nullptr) {
mServiceName = service_name;
}
+ SensorsVtsEnvironmentBase(const SensorsVtsEnvironmentBase&) = delete;
+ SensorsVtsEnvironmentBase& operator=(const SensorsVtsEnvironmentBase&) = delete;
virtual ~SensorsVtsEnvironmentBase(){};
void addEvent(const Event& ev) {
std::lock_guard<std::mutex> lock(mEventsMutex);
- if (mCollectionEnabled) {
+ if (mCollectionEnabled && (!mEventFilter.has_value() || (*mEventFilter)(ev))) {
mEvents.push_back(ev);
}
@@ -136,11 +148,10 @@
std::atomic_bool mStopThread;
std::thread mPollThread;
std::vector<Event> mEvents;
+ std::optional<std::function<bool(const Event&)>> mEventFilter;
std::mutex mEventsMutex;
IEventCallback<Event>* mCallback;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SensorsVtsEnvironmentBase<Event>);
};
#endif // ANDROID_SENSORS_VTS_ENVIRONMENT_BASE_H
\ No newline at end of file
diff --git a/staging/threadnetwork/aidl/Android.bp b/staging/threadnetwork/aidl/Android.bp
index fcd3ab8..b59d6da 100644
--- a/staging/threadnetwork/aidl/Android.bp
+++ b/staging/threadnetwork/aidl/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
aidl_interface {
name: "android.hardware.threadnetwork",
host_supported: true,
diff --git a/staging/threadnetwork/aidl/default/Android.bp b/staging/threadnetwork/aidl/default/Android.bp
index c701295..8fc22ad 100644
--- a/staging/threadnetwork/aidl/default/Android.bp
+++ b/staging/threadnetwork/aidl/default/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
cc_defaults {
name: "threadnetwork_service_default",
vendor: true,
diff --git a/staging/threadnetwork/aidl/vts/Android.bp b/staging/threadnetwork/aidl/vts/Android.bp
index 70386d9..e2609ed 100644
--- a/staging/threadnetwork/aidl/vts/Android.bp
+++ b/staging/threadnetwork/aidl/vts/Android.bp
@@ -14,6 +14,15 @@
// limitations under the License.
//
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
cc_test {
name: "VtsHalThreadNetworkTargetTest",
defaults: [
diff --git a/tetheroffload/aidl/Android.bp b/tetheroffload/aidl/Android.bp
index 1d80586..b3b6ebf 100644
--- a/tetheroffload/aidl/Android.bp
+++ b/tetheroffload/aidl/Android.bp
@@ -4,6 +4,7 @@
aidl_interface {
name: "android.hardware.tetheroffload",
+ owner: "google",
vendor_available: true,
srcs: ["android/hardware/tetheroffload/*.aidl"],
stability: "vintf",
@@ -23,5 +24,4 @@
apps_enabled: false,
},
},
- frozen: false,
}
diff --git a/thermal/utils/Android.bp b/thermal/utils/Android.bp
new file mode 100644
index 0000000..72e1e34
--- /dev/null
+++ b/thermal/utils/Android.bp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_library_static {
+ name: "libthermalutils",
+ vendor_available: true,
+ export_include_dirs: ["include"],
+ srcs: [
+ "ThermalHidlWrapper.cpp",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "android.hardware.thermal@2.0",
+ "android.hardware.thermal-V1-ndk",
+ ],
+}
diff --git a/thermal/utils/ThermalHidlWrapper.cpp b/thermal/utils/ThermalHidlWrapper.cpp
new file mode 100644
index 0000000..05a992a
--- /dev/null
+++ b/thermal/utils/ThermalHidlWrapper.cpp
@@ -0,0 +1,305 @@
+/*
+ * 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 "include/thermalutils/ThermalHidlWrapper.h"
+
+#include <hidl/HidlTransportSupport.h>
+
+#include <cmath>
+
+namespace aidl {
+namespace android {
+namespace hardware {
+namespace thermal {
+
+using ::android::hardware::Void;
+
+namespace {
+
+template <typename T, typename U>
+Return<void> setFailureAndCallback(T _hidl_cb, hidl_vec<U> data, std::string_view debug_msg) {
+ ThermalStatus status;
+ status.code = ThermalStatusCode::FAILURE;
+ status.debugMessage = debug_msg.data();
+ _hidl_cb(status, data);
+ return Void();
+}
+
+template <typename T>
+Return<void> setFailureAndCallback(T _hidl_cb, std::string_view debug_msg) {
+ ThermalStatus status;
+ status.code = ThermalStatusCode::FAILURE;
+ status.debugMessage = debug_msg.data();
+ _hidl_cb(status);
+ return Void();
+}
+
+template <typename T, typename U>
+Return<void> setInitFailureAndCallback(T _hidl_cb, hidl_vec<U> data) {
+ return setFailureAndCallback(
+ _hidl_cb, data, "Thermal AIDL HAL client used by HIDL wrapper was not initialized");
+}
+
+template <typename T>
+Return<void> setInitFailureAndCallback(T _hidl_cb) {
+ return setFailureAndCallback(
+ _hidl_cb, "Thermal AIDL HAL client used by HIDL wrapper was not initialized");
+}
+
+template <typename T, typename U>
+Return<void> setUnsupportedFailureAndCallback(T _hidl_cb, hidl_vec<U> data) {
+ return setFailureAndCallback(_hidl_cb, data, "Operation unsupported by Thermal HIDL wrapper");
+}
+
+TemperatureType_2_0 convertAidlTemperatureType(const TemperatureType& type) {
+ if (type < TemperatureType::CPU || type > TemperatureType::NPU) {
+ return TemperatureType_2_0::UNKNOWN;
+ }
+ return static_cast<TemperatureType_2_0>(type);
+}
+
+CoolingType_2_0 convertAidlCoolingType(const CoolingType& type) {
+ if (type < CoolingType::FAN || type > CoolingType::COMPONENT) {
+ return CoolingType_2_0::COMPONENT;
+ }
+ return static_cast<CoolingType_2_0>(type);
+}
+
+Temperature_2_0 convertAidlTemperature(const Temperature& temperature) {
+ Temperature_2_0 t = Temperature_2_0{
+ convertAidlTemperatureType(temperature.type), temperature.name, temperature.value,
+ static_cast<ThrottlingSeverity_2_0>(temperature.throttlingStatus)};
+ return t;
+}
+
+CoolingDevice_2_0 convertAidlCoolingDevice(const CoolingDevice& cooling_device) {
+ CoolingDevice_2_0 t =
+ CoolingDevice_2_0{convertAidlCoolingType(cooling_device.type), cooling_device.name,
+ static_cast<uint64_t>(cooling_device.value)};
+ return t;
+}
+TemperatureThreshold_2_0 convertAidlTemperatureThreshold(const TemperatureThreshold& threshold) {
+ TemperatureThreshold_2_0 t =
+ TemperatureThreshold_2_0{convertAidlTemperatureType(threshold.type), threshold.name,
+ threshold.hotThrottlingThresholds.data(),
+ threshold.coldThrottlingThresholds.data(), NAN};
+ return t;
+}
+
+} // namespace
+
+// Methods from ::android::hardware::thermal::V1_0::IThermal follow.
+Return<void> ThermalHidlWrapper::getTemperatures(getTemperatures_cb _hidl_cb) {
+ hidl_vec<Temperature_1_0> ret_1_0;
+ setUnsupportedFailureAndCallback(_hidl_cb, ret_1_0);
+ return Void();
+}
+
+Return<void> ThermalHidlWrapper::getCpuUsages(
+ std::function<void(const ThermalStatus&, const hidl_vec<CpuUsage>&)> _hidl_cb) {
+ hidl_vec<CpuUsage> ret_1_0;
+ setUnsupportedFailureAndCallback(_hidl_cb, ret_1_0);
+ return Void();
+}
+
+Return<void> ThermalHidlWrapper::getCoolingDevices(
+ std::function<void(const ThermalStatus&, const hidl_vec<CoolingDevice_1_0>&)> _hidl_cb) {
+ hidl_vec<CoolingDevice_1_0> ret_1_0;
+ setUnsupportedFailureAndCallback(_hidl_cb, ret_1_0);
+ return Void();
+}
+
+// Methods from ::android::hardware::thermal::V2_0::IThermal follow.
+Return<void> ThermalHidlWrapper::getCurrentTemperatures(
+ bool filterType, TemperatureType_2_0 type,
+ std::function<void(const ThermalStatus&, const hidl_vec<Temperature_2_0>&)> _hidl_cb) {
+ hidl_vec<Temperature_2_0> ret_2_0;
+ if (!thermal_service_) {
+ setInitFailureAndCallback(_hidl_cb, ret_2_0);
+ }
+
+ std::vector<Temperature> ret_aidl;
+ ThermalStatus status;
+ ::ndk::ScopedAStatus a_status;
+ if (filterType) {
+ a_status = thermal_service_->getTemperaturesWithType(static_cast<TemperatureType>(type),
+ &ret_aidl);
+ } else {
+ a_status = thermal_service_->getTemperatures(&ret_aidl);
+ }
+ if (a_status.isOk()) {
+ std::vector<Temperature_2_0> ret;
+ for (const auto& temperature : ret_aidl) {
+ ret.push_back(convertAidlTemperature(temperature));
+ }
+ _hidl_cb(status, hidl_vec<Temperature_2_0>(ret));
+ } else {
+ setFailureAndCallback(_hidl_cb, ret_2_0, a_status.getMessage());
+ }
+ return Void();
+}
+
+Return<void> ThermalHidlWrapper::getTemperatureThresholds(
+ bool filterType, TemperatureType_2_0 type,
+ std::function<void(const ThermalStatus&, const hidl_vec<TemperatureThreshold_2_0>&)>
+ _hidl_cb) {
+ hidl_vec<TemperatureThreshold_2_0> ret_2_0;
+ if (!thermal_service_) {
+ setInitFailureAndCallback(_hidl_cb, ret_2_0);
+ }
+
+ std::vector<TemperatureThreshold> ret_aidl;
+ ThermalStatus status;
+ ::ndk::ScopedAStatus a_status;
+ if (filterType) {
+ a_status = thermal_service_->getTemperatureThresholdsWithType(
+ static_cast<TemperatureType>(type), &ret_aidl);
+ } else {
+ a_status = thermal_service_->getTemperatureThresholds(&ret_aidl);
+ }
+ if (a_status.isOk()) {
+ std::vector<TemperatureThreshold_2_0> ret;
+ for (const auto& threshold : ret_aidl) {
+ ret.push_back(convertAidlTemperatureThreshold(threshold));
+ }
+ _hidl_cb(status, hidl_vec<TemperatureThreshold_2_0>(ret));
+ } else {
+ setFailureAndCallback(_hidl_cb, ret_2_0, a_status.getMessage());
+ }
+ return Void();
+}
+
+Return<void> ThermalHidlWrapper::registerThermalChangedCallback(
+ const sp<IThermalChangedCallback_2_0>& callback, bool filterType, TemperatureType_2_0 type,
+ std::function<void(const ThermalStatus&)> _hidl_cb) {
+ if (!thermal_service_) {
+ setInitFailureAndCallback(_hidl_cb);
+ }
+ if (callback == nullptr) {
+ setFailureAndCallback(_hidl_cb, "Invalid nullptr callback");
+ return Void();
+ }
+ std::lock_guard<std::mutex> _lock(callback_wrappers_mutex_);
+ for (const auto& callback_wrapper : callback_wrappers_) {
+ if (::android::hardware::interfacesEqual(callback_wrapper->callback_2_0_.get(),
+ callback.get())) {
+ setFailureAndCallback(_hidl_cb, "The callback was already registered through wrapper");
+ return Void();
+ }
+ }
+ std::shared_ptr<IThermalChangedCallbackWrapper> callback_wrapper =
+ ndk::SharedRefBase::make<IThermalChangedCallbackWrapper>(callback);
+ ::ndk::ScopedAStatus a_status;
+ ThermalStatus status;
+ if (filterType) {
+ a_status = thermal_service_->registerThermalChangedCallbackWithType(
+ callback_wrapper, static_cast<TemperatureType>(type));
+ } else {
+ a_status = thermal_service_->registerThermalChangedCallback(callback_wrapper);
+ }
+ if (a_status.isOk()) {
+ callback_wrappers_.push_back(callback_wrapper);
+ _hidl_cb(status);
+ } else {
+ setFailureAndCallback(_hidl_cb, a_status.getMessage());
+ }
+ return Void();
+}
+
+Return<void> ThermalHidlWrapper::unregisterThermalChangedCallback(
+ const sp<IThermalChangedCallback_2_0>& callback,
+ std::function<void(const ThermalStatus&)> _hidl_cb) {
+ if (!thermal_service_) {
+ setInitFailureAndCallback(_hidl_cb);
+ }
+ if (callback == nullptr) {
+ setFailureAndCallback(_hidl_cb, "Invalid nullptr callback");
+ return Void();
+ }
+ std::lock_guard<std::mutex> _lock(callback_wrappers_mutex_);
+ for (auto it = callback_wrappers_.begin(); it != callback_wrappers_.end(); it++) {
+ auto callback_wrapper = *it;
+ if (::android::hardware::interfacesEqual(callback_wrapper->callback_2_0_.get(),
+ callback.get())) {
+ ::ndk::ScopedAStatus a_status;
+ ThermalStatus status;
+ a_status = thermal_service_->unregisterThermalChangedCallback(callback_wrapper);
+ if (a_status.isOk()) {
+ callback_wrappers_.erase(it);
+ _hidl_cb(status);
+ } else {
+ setFailureAndCallback(_hidl_cb, a_status.getMessage());
+ }
+ return Void();
+ }
+ }
+ setFailureAndCallback(_hidl_cb, "The callback was not registered through wrapper before");
+ return Void();
+}
+
+Return<void> ThermalHidlWrapper::getCurrentCoolingDevices(
+ bool filterType, CoolingType_2_0 type,
+ std::function<void(const ThermalStatus&, const hidl_vec<CoolingDevice_2_0>&)> _hidl_cb) {
+ hidl_vec<CoolingDevice_2_0> ret_2_0;
+ if (!thermal_service_) {
+ setInitFailureAndCallback(_hidl_cb, ret_2_0);
+ }
+
+ std::vector<CoolingDevice> ret_aidl;
+ ThermalStatus status;
+ ::ndk::ScopedAStatus a_status;
+ if (filterType) {
+ a_status = thermal_service_->getCoolingDevicesWithType(static_cast<CoolingType>(type),
+ &ret_aidl);
+ } else {
+ a_status = thermal_service_->getCoolingDevices(&ret_aidl);
+ }
+ if (a_status.isOk()) {
+ std::vector<CoolingDevice_2_0> ret;
+ for (const auto& cooling_device : ret_aidl) {
+ ret.push_back(convertAidlCoolingDevice(cooling_device));
+ }
+ _hidl_cb(status, hidl_vec<CoolingDevice_2_0>(ret));
+ } else {
+ setFailureAndCallback(_hidl_cb, ret_2_0, a_status.getMessage());
+ }
+ return Void();
+}
+
+// Methods from ::android::hidl::base::V1_0::IBase follow.
+Return<void> ThermalHidlWrapper::debug(const hidl_handle& handle,
+ const hidl_vec<hidl_string>& args) {
+ if (handle != nullptr && handle->numFds >= 1) {
+ int fd = handle->data[0];
+ char** arr = new char*[args.size()];
+ for (size_t i = 0; i < args.size(); i++) {
+ arr[i] = strdup(args[i].c_str());
+ }
+ thermal_service_->dump(fd, (const char**)arr, args.size());
+ }
+ return Void();
+}
+
+::ndk::ScopedAStatus ThermalHidlWrapper::IThermalChangedCallbackWrapper::notifyThrottling(
+ const Temperature& temperature) {
+ callback_2_0_->notifyThrottling(convertAidlTemperature(temperature));
+ return ::ndk::ScopedAStatus::ok();
+}
+
+} // namespace thermal
+} // namespace hardware
+} // namespace android
+} // namespace aidl
diff --git a/thermal/utils/include/thermalutils/ThermalHidlWrapper.h b/thermal/utils/include/thermalutils/ThermalHidlWrapper.h
new file mode 100644
index 0000000..1fec100
--- /dev/null
+++ b/thermal/utils/include/thermalutils/ThermalHidlWrapper.h
@@ -0,0 +1,106 @@
+/*
+ * 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/thermal/BnThermalChangedCallback.h>
+#include <aidl/android/hardware/thermal/IThermal.h>
+#include <android/hardware/thermal/2.0/IThermal.h>
+#include <android/hardware/thermal/2.0/IThermalChangedCallback.h>
+#include <android/hardware/thermal/2.0/types.h>
+#include <hidl/Status.h>
+
+#include <utility>
+
+namespace aidl {
+namespace android {
+namespace hardware {
+namespace thermal {
+
+using ::android::sp;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_handle;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+
+using IThermal_Aidl = ::aidl::android::hardware::thermal::IThermal;
+using ::android::hardware::thermal::V1_0::CpuUsage;
+using CoolingType_2_0 = ::android::hardware::thermal::V2_0::CoolingType;
+using CoolingDevice_1_0 = ::android::hardware::thermal::V1_0::CoolingDevice;
+using CoolingDevice_2_0 = ::android::hardware::thermal::V2_0::CoolingDevice;
+using IThermal_2_0 = ::android::hardware::thermal::V2_0::IThermal;
+using IThermalChangedCallback_2_0 = ::android::hardware::thermal::V2_0::IThermalChangedCallback;
+using Temperature_1_0 = ::android::hardware::thermal::V1_0::Temperature;
+using Temperature_2_0 = ::android::hardware::thermal::V2_0::Temperature;
+using TemperatureType_2_0 = ::android::hardware::thermal::V2_0::TemperatureType;
+
+using ::android::hardware::thermal::V1_0::ThermalStatus;
+using ::android::hardware::thermal::V1_0::ThermalStatusCode;
+
+using TemperatureThreshold_2_0 = ::android::hardware::thermal::V2_0::TemperatureThreshold;
+using ThrottlingSeverity_2_0 = ::android::hardware::thermal::V2_0::ThrottlingSeverity;
+
+// This wrapper converts all Thermal HIDL 2.0 calls to AIDL calls and converts AIDL response to
+// HIDL 2.0 response.
+//
+// For Thermal HIDL 1.0 calls, it returns unsupported error.
+class ThermalHidlWrapper : public IThermal_2_0 {
+ public:
+ explicit ThermalHidlWrapper(::std::shared_ptr<IThermal_Aidl> thermal_service)
+ : thermal_service_(std::move(thermal_service)) {}
+
+ // Methods from ::android::hardware::thermal::V1_0::IThermal follow.
+ Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override;
+ Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override;
+ Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override;
+
+ // Methods from ::android::hardware::thermal::V2_0::IThermal follow.
+ Return<void> getCurrentTemperatures(bool filterType, TemperatureType_2_0 type,
+ getCurrentTemperatures_cb _hidl_cb) override;
+ Return<void> getTemperatureThresholds(bool filterType, TemperatureType_2_0 type,
+ getTemperatureThresholds_cb _hidl_cb) override;
+ Return<void> registerThermalChangedCallback(
+ const sp<IThermalChangedCallback_2_0>& callback, bool filterType,
+ TemperatureType_2_0 type, registerThermalChangedCallback_cb _hidl_cb) override;
+ Return<void> unregisterThermalChangedCallback(
+ const sp<IThermalChangedCallback_2_0>& callback,
+ unregisterThermalChangedCallback_cb _hidl_cb) override;
+ Return<void> getCurrentCoolingDevices(bool filterType, CoolingType_2_0 type,
+ getCurrentCoolingDevices_cb _hidl_cb) override;
+
+ // Methods from ::android::hidl::base::V1_0::IBase follow.
+ Return<void> debug(const hidl_handle& handle, const hidl_vec<hidl_string>& args) override;
+
+ private:
+ class IThermalChangedCallbackWrapper : public BnThermalChangedCallback {
+ public:
+ explicit IThermalChangedCallbackWrapper(const sp<IThermalChangedCallback_2_0>& callback_2_0)
+ : callback_2_0_(callback_2_0) {}
+ ::ndk::ScopedAStatus notifyThrottling(const Temperature& temperature) override;
+ sp<IThermalChangedCallback_2_0> callback_2_0_;
+ };
+
+ // Reference to thermal service.
+ ::std::shared_ptr<IThermal_Aidl> thermal_service_;
+ // Mutex lock for read/write on callback wrappers.
+ std::mutex callback_wrappers_mutex_;
+ // All thermal changed callback wrappers registered.
+ ::std::vector<std::shared_ptr<IThermalChangedCallbackWrapper>> callback_wrappers_;
+};
+
+} // namespace thermal
+} // namespace hardware
+} // namespace android
+} // namespace aidl
diff --git a/thermal/utils/tests/Android.bp b/thermal/utils/tests/Android.bp
new file mode 100644
index 0000000..fd74e8b
--- /dev/null
+++ b/thermal/utils/tests/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_test {
+ name: "ThermalHidlWrapperTest",
+ srcs: ["ThermalHidlWrapperTest.cpp"],
+ defaults: [
+ "VtsHalTargetTestDefaults",
+ "use_libaidlvintf_gtest_helper_static",
+ ],
+ shared_libs: [
+ "libbinder_ndk",
+ "android.hardware.thermal@1.0",
+ "android.hardware.thermal@2.0",
+ "android.hardware.thermal-V1-ndk",
+ ],
+ static_libs: [
+ "libthermalutils",
+ "libgtest",
+ ],
+ test_suites: [
+ "device-tests",
+ ],
+}
diff --git a/thermal/utils/tests/ThermalHidlWrapperTest.cpp b/thermal/utils/tests/ThermalHidlWrapperTest.cpp
new file mode 100644
index 0000000..1723a1a
--- /dev/null
+++ b/thermal/utils/tests/ThermalHidlWrapperTest.cpp
@@ -0,0 +1,302 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "thermal_hidl_wrapper_test"
+#include <VtsHalHidlTargetCallbackBase.h>
+#include <aidl/Vintf.h>
+#include <aidl/android/hardware/thermal/BnThermal.h>
+#include <aidl/android/hardware/thermal/BnThermalChangedCallback.h>
+#include <android-base/logging.h>
+#include <android-base/properties.h>
+#include <android/binder_ibinder.h>
+#include <android/binder_interface_utils.h>
+#include <android/binder_manager.h>
+#include <android/binder_process.h>
+#include <android/binder_status.h>
+#include <android/hardware/thermal/2.0/IThermal.h>
+#include <android/hardware/thermal/2.0/IThermalChangedCallback.h>
+#include <android/hardware/thermal/2.0/types.h>
+#include <gtest/gtest.h>
+#include <hidl/GtestPrinter.h>
+#include <hidl/ServiceManagement.h>
+#include <thermalutils/ThermalHidlWrapper.h>
+#include <unistd.h>
+
+#include <algorithm>
+#include <chrono>
+#include <cmath>
+#include <memory>
+#include <string>
+#include <thread>
+#include <vector>
+
+namespace aidl::android::hardware::thermal {
+
+namespace {
+
+using ::android::sp;
+using ::android::hardware::hidl_enum_range;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+using ::android::hardware::thermal::V1_0::ThermalStatus;
+using ::android::hardware::thermal::V1_0::ThermalStatusCode;
+using ::android::hardware::thermal::V2_0::CoolingDevice;
+using ::android::hardware::thermal::V2_0::CoolingType;
+using IThermal_2_0 = ::android::hardware::thermal::V2_0::IThermal;
+using ::android::hardware::thermal::V2_0::IThermalChangedCallback;
+using ::android::hardware::thermal::V2_0::Temperature;
+using ::android::hardware::thermal::V2_0::TemperatureThreshold;
+using ::android::hardware::thermal::V2_0::TemperatureType;
+using ::android::hardware::thermal::V2_0::ThrottlingSeverity;
+
+constexpr char kCallbackNameNotifyThrottling[] = "notifyThrottling";
+static const Temperature kThrottleTemp = {
+ .type = TemperatureType::SKIN,
+ .name = "test temperature sensor",
+ .value = 98.6,
+ .throttlingStatus = ThrottlingSeverity::CRITICAL,
+};
+
+class ThermalCallbackArgs {
+ public:
+ Temperature temperature;
+};
+
+// Callback class for receiving thermal event notifications from main class
+class ThermalCallback : public ::testing::VtsHalHidlTargetCallbackBase<ThermalCallbackArgs>,
+ public IThermalChangedCallback {
+ public:
+ Return<void> notifyThrottling(const Temperature& temperature) override {
+ ThermalCallbackArgs args;
+ args.temperature = temperature;
+ NotifyFromCallback(kCallbackNameNotifyThrottling, args);
+ return Void();
+ }
+};
+
+// The main test class for THERMAL HIDL HAL 2.0.
+class ThermalHidlWrapperTest : public ::testing::TestWithParam<std::string> {
+ public:
+ void SetUp() override {
+ AIBinder* binder = AServiceManager_waitForService(GetParam().c_str());
+ ASSERT_NE(binder, nullptr);
+ mThermal = sp<ThermalHidlWrapper>::make(IThermal::fromBinder(ndk::SpAIBinder(binder)));
+ ASSERT_NE(mThermal, nullptr);
+ mThermalCallback = new (std::nothrow) ThermalCallback();
+ ASSERT_NE(mThermalCallback, nullptr);
+ auto ret = mThermal->registerThermalChangedCallback(
+ mThermalCallback, false, TemperatureType::SKIN,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Expect to fail if register again
+ ret = mThermal->registerThermalChangedCallback(
+ mThermalCallback, false, TemperatureType::SKIN,
+ [](ThermalStatus status) { EXPECT_NE(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ }
+
+ void TearDown() override {
+ auto ret = mThermal->unregisterThermalChangedCallback(
+ mThermalCallback,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Expect to fail if unregister again
+ ret = mThermal->unregisterThermalChangedCallback(
+ mThermalCallback,
+ [](ThermalStatus status) { EXPECT_NE(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ }
+
+ protected:
+ sp<IThermal_2_0> mThermal;
+ sp<ThermalCallback> mThermalCallback;
+}; // class ThermalHidlWrapperTest
+
+// Test ThermalChangedCallback::notifyThrottling().
+// This just calls into and back from our local ThermalChangedCallback impl.
+TEST_P(ThermalHidlWrapperTest, NotifyThrottlingTest) {
+ sp<ThermalCallback> thermalCallback = new (std::nothrow) ThermalCallback();
+ auto ret = thermalCallback->notifyThrottling(kThrottleTemp);
+ ASSERT_TRUE(ret.isOk());
+ auto res = thermalCallback->WaitForCallback(kCallbackNameNotifyThrottling);
+ EXPECT_TRUE(res.no_timeout);
+ ASSERT_TRUE(res.args);
+ EXPECT_EQ(kThrottleTemp, res.args->temperature);
+}
+
+// Test Thermal->registerThermalChangedCallback.
+TEST_P(ThermalHidlWrapperTest, RegisterThermalChangedCallbackTest) {
+ // Expect to fail with same callback
+ auto ret = mThermal->registerThermalChangedCallback(
+ mThermalCallback, false, TemperatureType::SKIN,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::FAILURE, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Expect to fail with null callback
+ ret = mThermal->registerThermalChangedCallback(
+ nullptr, false, TemperatureType::SKIN,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::FAILURE, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ sp<ThermalCallback> localThermalCallback = new (std::nothrow) ThermalCallback();
+ // Expect to succeed with different callback
+ ret = mThermal->registerThermalChangedCallback(
+ localThermalCallback, false, TemperatureType::SKIN,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Remove the local callback
+ ret = mThermal->unregisterThermalChangedCallback(
+ localThermalCallback,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Expect to fail with null callback
+ ret = mThermal->unregisterThermalChangedCallback(nullptr, [](ThermalStatus status) {
+ EXPECT_EQ(ThermalStatusCode::FAILURE, status.code);
+ });
+ ASSERT_TRUE(ret.isOk());
+}
+
+// Test Thermal->unregisterThermalChangedCallback.
+TEST_P(ThermalHidlWrapperTest, UnregisterThermalChangedCallbackTest) {
+ sp<ThermalCallback> localThermalCallback = new (std::nothrow) ThermalCallback();
+ // Expect to fail as the callback was not registered before
+ auto ret = mThermal->unregisterThermalChangedCallback(
+ localThermalCallback,
+ [](ThermalStatus status) { EXPECT_NE(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Register a local callback
+ ret = mThermal->registerThermalChangedCallback(
+ localThermalCallback, false, TemperatureType::SKIN,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Expect to succeed with callback removed
+ ret = mThermal->unregisterThermalChangedCallback(
+ localThermalCallback,
+ [](ThermalStatus status) { EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+ // Expect to fail as the callback has been unregistered already
+ ret = mThermal->unregisterThermalChangedCallback(
+ localThermalCallback,
+ [](ThermalStatus status) { EXPECT_NE(ThermalStatusCode::SUCCESS, status.code); });
+ ASSERT_TRUE(ret.isOk());
+}
+
+// Sanity test for Thermal::getCurrentTemperatures().
+TEST_P(ThermalHidlWrapperTest, TemperatureTest) {
+ mThermal->getCurrentTemperatures(false, TemperatureType::SKIN,
+ [](ThermalStatus status, hidl_vec<Temperature> temperatures) {
+ if (temperatures.size()) {
+ EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+ } else {
+ EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
+ }
+ for (int i = 0; i < temperatures.size(); ++i) {
+ EXPECT_LT(0u, temperatures[i].name.size());
+ }
+ });
+ auto types = hidl_enum_range<TemperatureType>();
+ for (const auto& type : types) {
+ mThermal->getCurrentTemperatures(
+ true, type, [&type](ThermalStatus status, hidl_vec<Temperature> temperatures) {
+ if (temperatures.size()) {
+ EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+ } else {
+ EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
+ }
+ for (int i = 0; i < temperatures.size(); ++i) {
+ EXPECT_EQ(type, temperatures[i].type);
+ EXPECT_LT(0u, temperatures[i].name.size());
+ }
+ });
+ }
+}
+
+// Sanity test for Thermal::getTemperatureThresholds().
+TEST_P(ThermalHidlWrapperTest, TemperatureThresholdTest) {
+ mThermal->getTemperatureThresholds(
+ false, TemperatureType::SKIN,
+ [](ThermalStatus status, hidl_vec<TemperatureThreshold> temperatures) {
+ if (temperatures.size()) {
+ EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+ } else {
+ EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
+ }
+ });
+ for (int i = static_cast<int>(TemperatureType::UNKNOWN);
+ i <= static_cast<int>(TemperatureType::POWER_AMPLIFIER); ++i) {
+ auto type = static_cast<TemperatureType>(i);
+ mThermal->getTemperatureThresholds(
+ true, type,
+ [&type](ThermalStatus status, hidl_vec<TemperatureThreshold> temperatures) {
+ if (temperatures.size()) {
+ EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+ } else {
+ EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
+ }
+ for (int i = 0; i < temperatures.size(); ++i) {
+ EXPECT_EQ(type, temperatures[i].type);
+ }
+ });
+ }
+}
+
+// Sanity test for Thermal::getCurrentCoolingDevices().
+TEST_P(ThermalHidlWrapperTest, CoolingDeviceTest) {
+ mThermal->getCurrentCoolingDevices(
+ false, CoolingType::CPU,
+ [](ThermalStatus status, hidl_vec<CoolingDevice> cooling_devices) {
+ if (cooling_devices.size()) {
+ EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+ } else {
+ EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
+ }
+ for (int i = 0; i < cooling_devices.size(); ++i) {
+ EXPECT_LT(0u, cooling_devices[i].name.size());
+ }
+ });
+ for (int i = 0; i <= static_cast<int>(CoolingType::COMPONENT); ++i) {
+ auto type = static_cast<CoolingType>(i);
+ mThermal->getCurrentCoolingDevices(
+ true, type, [&type](ThermalStatus status, hidl_vec<CoolingDevice> cooling_devices) {
+ if (cooling_devices.size()) {
+ EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+ } else {
+ EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
+ }
+ for (int i = 0; i < cooling_devices.size(); ++i) {
+ EXPECT_EQ(type, cooling_devices[i].type);
+ EXPECT_LT(0u, cooling_devices[i].name.size());
+ }
+ });
+ }
+}
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ThermalHidlWrapperTest);
+INSTANTIATE_TEST_SUITE_P(
+ PerInstance, ThermalHidlWrapperTest,
+ testing::ValuesIn(::android::getAidlHalInstanceNames(IThermal::descriptor)),
+ ::android::hardware::PrintInstanceNameToString);
+
+} // namespace
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ ABinderProcess_setThreadPoolMaxThreadCount(1);
+ ABinderProcess_startThreadPool();
+ return RUN_ALL_TESTS();
+}
+
+} // namespace aidl::android::hardware::thermal
diff --git a/tv/cec/1.0/default/HdmiCecDefault.cpp b/tv/cec/1.0/default/HdmiCecDefault.cpp
index 26ccb7d..2a5197c 100644
--- a/tv/cec/1.0/default/HdmiCecDefault.cpp
+++ b/tv/cec/1.0/default/HdmiCecDefault.cpp
@@ -278,6 +278,10 @@
Return<bool> HdmiCecDefault::isConnected(int32_t portId) {
uint16_t addr;
+ if (portId < 0 || portId >= mHdmiCecPorts.size()) {
+ LOG(ERROR) << "Port id is out of bounds, portId = " << portId;
+ return false;
+ }
int ret = ioctl(mHdmiCecPorts[portId]->mCecFd, CEC_ADAP_G_PHYS_ADDR, &addr);
if (ret) {
LOG(ERROR) << "Is connected failed, Error = " << strerror(errno);
diff --git a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessage.aidl b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessage.aidl
index 637b01c..04cb099 100644
--- a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessage.aidl
+++ b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessage.aidl
@@ -37,4 +37,5 @@
String subType;
long groupId;
int dataLengthBytes;
+ const long NO_GROUP_ID = (-1) /* -1 */;
}
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/TvMessage.aidl b/tv/input/aidl/android/hardware/tv/input/TvMessage.aidl
index 6df1f9a..88da538 100644
--- a/tv/input/aidl/android/hardware/tv/input/TvMessage.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/TvMessage.aidl
@@ -19,6 +19,10 @@
@VintfStability
parcelable TvMessage {
/**
+ * This value for TvMessage.groupId denotes that the message doesn't belong to any group.
+ */
+ const long NO_GROUP_ID = -1;
+ /**
* Extended data type, like “ATSC A/336 Watermark”, “ATSC_CC”, etc. This is opaque
* to the framework.
*/
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/default/Dvr.cpp b/tv/tuner/1.0/default/Dvr.cpp
index 40879f2..9d6d86d 100644
--- a/tv/tuner/1.0/default/Dvr.cpp
+++ b/tv/tuner/1.0/default/Dvr.cpp
@@ -164,7 +164,7 @@
return false;
}
- mDvrMQ = move(tmpDvrMQ);
+ mDvrMQ = std::move(tmpDvrMQ);
if (EventFlag::createEventFlag(mDvrMQ->getEventFlagWord(), &mDvrEventFlag) != OK) {
return false;
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/1.1/default/Dvr.cpp b/tv/tuner/1.1/default/Dvr.cpp
index fdb66c1..8262b4d 100644
--- a/tv/tuner/1.1/default/Dvr.cpp
+++ b/tv/tuner/1.1/default/Dvr.cpp
@@ -183,7 +183,7 @@
return false;
}
- mDvrMQ = move(tmpDvrMQ);
+ mDvrMQ = std::move(tmpDvrMQ);
if (EventFlag::createEventFlag(mDvrMQ->getEventFlagWord(), &mDvrEventFlag) != OK) {
return false;
diff --git a/tv/tuner/aidl/default/Dvr.cpp b/tv/tuner/aidl/default/Dvr.cpp
index c9dd8ee..c046ae3 100644
--- a/tv/tuner/aidl/default/Dvr.cpp
+++ b/tv/tuner/aidl/default/Dvr.cpp
@@ -172,7 +172,7 @@
return false;
}
- mDvrMQ = move(tmpDvrMQ);
+ mDvrMQ = std::move(tmpDvrMQ);
if (EventFlag::createEventFlag(mDvrMQ->getEventFlagWord(), &mDvrEventFlag) != ::android::OK) {
return false;
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/usb/gadget/1.1/default/lib/MonitorFfs.cpp b/usb/gadget/1.1/default/lib/MonitorFfs.cpp
index 0cdf038..6d09a8a 100644
--- a/usb/gadget/1.1/default/lib/MonitorFfs.cpp
+++ b/usb/gadget/1.1/default/lib/MonitorFfs.cpp
@@ -59,9 +59,9 @@
if (addEpollFd(epollFd, eventFd) == -1) abort();
- mEpollFd = move(epollFd);
- mInotifyFd = move(inotifyFd);
- mEventFd = move(eventFd);
+ mEpollFd = std::move(epollFd);
+ mInotifyFd = std::move(inotifyFd);
+ mEventFd = std::move(eventFd);
gadgetPullup = false;
}
diff --git a/usb/gadget/1.2/default/lib/MonitorFfs.cpp b/usb/gadget/1.2/default/lib/MonitorFfs.cpp
index 0cdf038..6d09a8a 100644
--- a/usb/gadget/1.2/default/lib/MonitorFfs.cpp
+++ b/usb/gadget/1.2/default/lib/MonitorFfs.cpp
@@ -59,9 +59,9 @@
if (addEpollFd(epollFd, eventFd) == -1) abort();
- mEpollFd = move(epollFd);
- mInotifyFd = move(inotifyFd);
- mEventFd = move(eventFd);
+ mEpollFd = std::move(epollFd);
+ mInotifyFd = std::move(inotifyFd);
+ mEventFd = std::move(eventFd);
gadgetPullup = false;
}
diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/.hash b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/.hash
index 856fa7c..42772bb 100644
--- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/.hash
+++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/.hash
@@ -1 +1 @@
-39791e3a4bb9892a340e94e44860048624d2f66e
+590d9f45625a2c353011cf85f18d1d08593b8a0a
diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
index e2c06e5..0cc01c5 100644
--- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
+++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/2/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
@@ -49,7 +49,7 @@
SUPPORTED_RANGE_DATA_NTF_CONFIG = 229,
SUPPORTED_RSSI_REPORTING = 230,
SUPPORTED_DIAGNOSTICS = 231,
- SUPPORTED_MIN_SLOT_DURATION_MS = 232,
+ SUPPORTED_MIN_SLOT_DURATION_RSTU = 232,
SUPPORTED_MAX_RANGING_SESSION_NUMBER = 233,
SUPPORTED_CHANNELS_AOA = 234,
}
diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
index e2c06e5..0cc01c5 100644
--- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
+++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
@@ -49,7 +49,7 @@
SUPPORTED_RANGE_DATA_NTF_CONFIG = 229,
SUPPORTED_RSSI_REPORTING = 230,
SUPPORTED_DIAGNOSTICS = 231,
- SUPPORTED_MIN_SLOT_DURATION_MS = 232,
+ SUPPORTED_MIN_SLOT_DURATION_RSTU = 232,
SUPPORTED_MAX_RANGING_SESSION_NUMBER = 233,
SUPPORTED_CHANNELS_AOA = 234,
}
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 dc2252b..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,4 +35,6 @@
@Backing(type="int") @VintfStability
enum UwbVendorReasonCodes {
REASON_ERROR_INVALID_CHANNEL_WITH_AOA = 128,
+ 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/UwbVendorStatusCodes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
index 2f534df..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,4 +36,6 @@
enum UwbVendorStatusCodes {
STATUS_ERROR_CCC_SE_BUSY = 80,
STATUS_ERROR_CCC_LIFECYCLE = 81,
+ STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 82,
+ STATUS_REGULATION_UWB_OFF = 83,
}
diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
index bf59318..891b6f0 100644
--- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
+++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
@@ -186,9 +186,9 @@
SUPPORTED_DIAGNOSTICS = 0xE7,
/**
- * 4 byte value to indicate supported min slot duration in ms.
+ * 4 byte value to indicate supported min slot duration in rstu.
*/
- SUPPORTED_MIN_SLOT_DURATION_MS = 0xE8,
+ SUPPORTED_MIN_SLOT_DURATION_RSTU = 0xE8,
/**
* Int value to indicate supported max number of fira ranging sessions
diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
index ae203a3..4207574 100644
--- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
+++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
@@ -24,11 +24,15 @@
@Backing(type="int")
enum UwbVendorReasonCodes {
/**
- * Use values from the vendor specific reason code range: 0x80 – 0xFF defined in Table 16 of
- * UCI specification.
+ * Use values from the vendor specific reason code range: 0x80 – 0xFF defined in
+ * Table 15 (state change with reason codes) of UCI specification.
*/
/** 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 = 0x82,
}
diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
index 8505b8a..f952334 100644
--- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
+++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
@@ -33,4 +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 = 0x53,
}
diff --git a/vibrator/OWNERS b/vibrator/OWNERS
index 05e2e73..62a567e 100644
--- a/vibrator/OWNERS
+++ b/vibrator/OWNERS
@@ -2,7 +2,6 @@
include platform/frameworks/base:/services/core/java/com/android/server/vibrator/OWNERS
-chasewu@google.com
chrispaulo@google.com
michaelwr@google.com
nathankulczak@google.com
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/vts/functional/wifi_nan_iface_hidl_test.cpp b/wifi/1.6/vts/functional/wifi_nan_iface_hidl_test.cpp
index 7bcc6d3..37c55e7 100644
--- a/wifi/1.6/vts/functional/wifi_nan_iface_hidl_test.cpp
+++ b/wifi/1.6/vts/functional/wifi_nan_iface_hidl_test.cpp
@@ -68,17 +68,10 @@
virtual void TearDown() override { stopWifi(GetInstanceName()); }
- /* Used as a mechanism to inform the test about data/event callback */
- inline void notify() {
- std::unique_lock<std::mutex> lock(mtx_);
- count_++;
- cv_.notify_one();
- }
enum CallbackType {
- INVALID = -2,
ANY_CALLBACK = -1,
-
+ INVALID = 0,
NOTIFY_CAPABILITIES_RESPONSE = 0,
NOTIFY_ENABLE_RESPONSE,
NOTIFY_CONFIG_RESPONSE,
@@ -114,8 +107,14 @@
EVENT_DATA_PATH_CONFIRM_1_6,
};
+ /* Used as a mechanism to inform the test about data/event callback */
+ inline void notify(CallbackType callbackType) {
+ std::unique_lock<std::mutex> lock(mtx_);
+ callbackEventBitMap |= (0x1 << callbackType);
+ cv_.notify_one();
+ }
/* Test code calls this function to wait for data/event callback */
- /* Must set callbackType = INVALID before call this function */
+ /* Must set callbackEventBitMap = INVALID before call this function */
inline std::cv_status wait(CallbackType waitForCallbackType) {
std::unique_lock<std::mutex> lock(mtx_);
@@ -124,15 +123,11 @@
std::cv_status status = std::cv_status::no_timeout;
auto now = std::chrono::system_clock::now();
- while (count_ == 0) {
+ while (!(callbackEventBitMap & (0x1 << waitForCallbackType))) {
status = cv_.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
- if (status == std::cv_status::timeout) return status;
- if (waitForCallbackType != ANY_CALLBACK && callbackType != INVALID &&
- callbackType != waitForCallbackType) {
- count_--;
- }
+ if (status == std::cv_status::timeout)
+ return status;
}
- count_--;
return status;
}
@@ -148,340 +143,276 @@
Return<void> notifyCapabilitiesResponse(
uint16_t id, const WifiNanStatus& status,
const ::android::hardware::wifi::V1_0::NanCapabilities& capabilities) override {
- parent_.callbackType = NOTIFY_CAPABILITIES_RESPONSE;
-
parent_.id = id;
parent_.status = status;
parent_.capabilities = capabilities;
- parent_.notify();
+ parent_.notify(NOTIFY_CAPABILITIES_RESPONSE);
return Void();
}
Return<void> notifyCapabilitiesResponse_1_5(
uint16_t id, const WifiNanStatus& status,
const ::android::hardware::wifi::V1_5::NanCapabilities& capabilities) override {
- parent_.callbackType = NOTIFY_CAPABILITIES_RESPONSE_1_5;
-
parent_.id = id;
parent_.status = status;
parent_.capabilities_1_5 = capabilities;
- parent_.notify();
+ parent_.notify(NOTIFY_CAPABILITIES_RESPONSE_1_5);
return Void();
}
Return<void> notifyEnableResponse(uint16_t id, const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_ENABLE_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_ENABLE_RESPONSE);
return Void();
}
Return<void> notifyConfigResponse(uint16_t id, const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_CONFIG_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_CONFIG_RESPONSE);
return Void();
}
Return<void> notifyDisableResponse(uint16_t id, const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_DISABLE_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_DISABLE_RESPONSE);
return Void();
}
Return<void> notifyStartPublishResponse(uint16_t id, const WifiNanStatus& status,
uint8_t sessionId) override {
- parent_.callbackType = NOTIFY_START_PUBLISH_RESPONSE;
-
parent_.id = id;
parent_.status = status;
parent_.sessionId = sessionId;
- parent_.notify();
+ parent_.notify(NOTIFY_START_PUBLISH_RESPONSE);
return Void();
}
Return<void> notifyStopPublishResponse(uint16_t id, const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_STOP_PUBLISH_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_STOP_PUBLISH_RESPONSE);
return Void();
}
Return<void> notifyStartSubscribeResponse(uint16_t id, const WifiNanStatus& status,
uint8_t sessionId) override {
- parent_.callbackType = NOTIFY_START_SUBSCRIBE_RESPONSE;
-
parent_.id = id;
parent_.status = status;
parent_.sessionId = sessionId;
- parent_.notify();
+ parent_.notify(NOTIFY_START_SUBSCRIBE_RESPONSE);
return Void();
}
Return<void> notifyStopSubscribeResponse(uint16_t id,
const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_STOP_SUBSCRIBE_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_STOP_SUBSCRIBE_RESPONSE);
return Void();
}
Return<void> notifyTransmitFollowupResponse(uint16_t id,
const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_TRANSMIT_FOLLOWUP_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_TRANSMIT_FOLLOWUP_RESPONSE);
return Void();
}
Return<void> notifyCreateDataInterfaceResponse(uint16_t id,
const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_CREATE_DATA_INTERFACE_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_CREATE_DATA_INTERFACE_RESPONSE);
return Void();
}
Return<void> notifyDeleteDataInterfaceResponse(uint16_t id,
const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_DELETE_DATA_INTERFACE_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_DELETE_DATA_INTERFACE_RESPONSE);
return Void();
}
Return<void> notifyInitiateDataPathResponse(uint16_t id, const WifiNanStatus& status,
uint32_t ndpInstanceId) override {
- parent_.callbackType = NOTIFY_INITIATE_DATA_PATH_RESPONSE;
-
parent_.id = id;
parent_.status = status;
parent_.ndpInstanceId = ndpInstanceId;
- parent_.notify();
+ parent_.notify(NOTIFY_INITIATE_DATA_PATH_RESPONSE);
return Void();
}
Return<void> notifyRespondToDataPathIndicationResponse(
uint16_t id, const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_RESPOND_TO_DATA_PATH_INDICATION_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_RESPOND_TO_DATA_PATH_INDICATION_RESPONSE);
return Void();
}
Return<void> notifyTerminateDataPathResponse(uint16_t id,
const WifiNanStatus& status) override {
- parent_.callbackType = NOTIFY_TERMINATE_DATA_PATH_RESPONSE;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(NOTIFY_TERMINATE_DATA_PATH_RESPONSE);
return Void();
}
Return<void> eventClusterEvent(const NanClusterEventInd& event) override {
- parent_.callbackType = EVENT_CLUSTER_EVENT;
-
parent_.nanClusterEventInd = event;
- parent_.notify();
+ parent_.notify(EVENT_CLUSTER_EVENT);
return Void();
}
Return<void> eventDisabled(const WifiNanStatus& status) override {
- parent_.callbackType = EVENT_DISABLED;
-
parent_.status = status;
- parent_.notify();
+ parent_.notify(EVENT_DISABLED);
return Void();
}
Return<void> eventPublishTerminated(uint8_t sessionId,
const WifiNanStatus& status) override {
- parent_.callbackType = EVENT_PUBLISH_TERMINATED;
-
parent_.sessionId = sessionId;
parent_.status = status;
- parent_.notify();
+ parent_.notify(EVENT_PUBLISH_TERMINATED);
return Void();
}
Return<void> eventSubscribeTerminated(uint8_t sessionId,
const WifiNanStatus& status) override {
- parent_.callbackType = EVENT_SUBSCRIBE_TERMINATED;
-
parent_.sessionId = sessionId;
parent_.status = status;
- parent_.notify();
+ parent_.notify(EVENT_SUBSCRIBE_TERMINATED);
return Void();
}
Return<void> eventMatch(
const ::android::hardware::wifi::V1_0::NanMatchInd& event) override {
- parent_.callbackType = EVENT_MATCH;
-
parent_.nanMatchInd = event;
- parent_.notify();
+ parent_.notify(EVENT_MATCH);
return Void();
}
Return<void> eventMatchExpired(uint8_t discoverySessionId, uint32_t peerId) override {
- parent_.callbackType = EVENT_MATCH_EXPIRED;
-
parent_.sessionId = discoverySessionId;
parent_.peerId = peerId;
- parent_.notify();
+ parent_.notify(EVENT_MATCH_EXPIRED);
return Void();
}
Return<void> eventFollowupReceived(const NanFollowupReceivedInd& event) override {
- parent_.callbackType = EVENT_FOLLOWUP_RECEIVED;
-
parent_.nanFollowupReceivedInd = event;
- parent_.notify();
+ parent_.notify(EVENT_FOLLOWUP_RECEIVED);
return Void();
}
Return<void> eventTransmitFollowup(uint16_t id, const WifiNanStatus& status) override {
- parent_.callbackType = EVENT_TRANSMIT_FOLLOWUP;
-
parent_.id = id;
parent_.status = status;
- parent_.notify();
+ parent_.notify(EVENT_TRANSMIT_FOLLOWUP);
return Void();
}
Return<void> eventDataPathRequest(const NanDataPathRequestInd& event) override {
- parent_.callbackType = EVENT_DATA_PATH_REQUEST;
-
parent_.nanDataPathRequestInd = event;
- parent_.notify();
+ parent_.notify(EVENT_DATA_PATH_REQUEST);
return Void();
}
Return<void> eventDataPathConfirm(
const ::android::hardware::wifi::V1_0::NanDataPathConfirmInd& event) override {
- parent_.callbackType = EVENT_DATA_PATH_CONFIRM;
-
parent_.nanDataPathConfirmInd = event;
- parent_.notify();
+ parent_.notify(EVENT_DATA_PATH_CONFIRM);
return Void();
}
Return<void> eventDataPathTerminated(uint32_t ndpInstanceId) override {
- parent_.callbackType = EVENT_DATA_PATH_TERMINATED;
-
parent_.ndpInstanceId = ndpInstanceId;
- parent_.notify();
+ parent_.notify(EVENT_DATA_PATH_TERMINATED);
return Void();
}
Return<void> eventDataPathConfirm_1_2(
const ::android::hardware::wifi::V1_2::NanDataPathConfirmInd& event) override {
- parent_.callbackType = EVENT_DATA_PATH_CONFIRM_1_2;
-
parent_.nanDataPathConfirmInd_1_2 = event;
- parent_.notify();
+ parent_.notify(EVENT_DATA_PATH_CONFIRM_1_2);
return Void();
}
Return<void> eventDataPathScheduleUpdate(
const ::android::hardware::wifi::V1_2::NanDataPathScheduleUpdateInd& event)
override {
- parent_.callbackType = EVENT_DATA_PATH_SCHEDULE_UPDATE;
-
parent_.nanDataPathScheduleUpdateInd_1_2 = event;
- parent_.notify();
+ parent_.notify(EVENT_DATA_PATH_SCHEDULE_UPDATE);
return Void();
}
Return<void> eventMatch_1_6(
const ::android::hardware::wifi::V1_6::NanMatchInd& event) override {
- parent_.callbackType = EVENT_MATCH_1_6;
-
parent_.nanMatchInd_1_6 = event;
- parent_.notify();
+ parent_.notify(EVENT_MATCH_1_6);
return Void();
}
Return<void> notifyCapabilitiesResponse_1_6(
uint16_t id, const WifiNanStatus& status,
const ::android::hardware::wifi::V1_6::NanCapabilities& capabilities) override {
- parent_.callbackType = NOTIFY_CAPABILITIES_RESPONSE_1_6;
-
parent_.id = id;
parent_.status = status;
parent_.capabilities_1_6 = capabilities;
- parent_.notify();
+ parent_.notify(NOTIFY_CAPABILITIES_RESPONSE_1_6);
return Void();
}
Return<void> eventDataPathScheduleUpdate_1_6(
const ::android::hardware::wifi::V1_6::NanDataPathScheduleUpdateInd& event)
override {
- parent_.callbackType = EVENT_DATA_PATH_SCHEDULE_UPDATE_1_6;
-
parent_.nanDataPathScheduleUpdateInd_1_6 = event;
- parent_.notify();
+ parent_.notify(EVENT_DATA_PATH_SCHEDULE_UPDATE_1_6);
return Void();
}
Return<void> eventDataPathConfirm_1_6(
const ::android::hardware::wifi::V1_6::NanDataPathConfirmInd& event) override {
- parent_.callbackType = EVENT_DATA_PATH_CONFIRM_1_6;
-
parent_.nanDataPathConfirmInd_1_6 = event;
- parent_.notify();
+ parent_.notify(EVENT_DATA_PATH_CONFIRM_1_6);
return Void();
}
};
@@ -490,7 +421,6 @@
// synchronization objects
std::mutex mtx_;
std::condition_variable cv_;
- int count_ = 0;
protected:
android::sp<::android::hardware::wifi::V1_6::IWifiNanIface> iwifiNanIface;
@@ -498,7 +428,7 @@
// Data from IWifiNanIfaceEventCallback callbacks: this is the collection of
// all arguments to all callbacks. They are set by the callback
// (notifications or events) and can be retrieved by tests.
- CallbackType callbackType;
+ uint32_t callbackEventBitMap;
uint16_t id;
WifiNanStatus status;
uint8_t sessionId;
@@ -535,7 +465,7 @@
*/
TEST_P(WifiNanIfaceHidlTest, enableRequest_1_6InvalidArgs) {
uint16_t inputCmdId = 10;
- callbackType = INVALID;
+ callbackEventBitMap = INVALID;
::android::hardware::wifi::V1_4::NanEnableRequest nanEnableRequest = {};
::android::hardware::wifi::V1_6::NanConfigRequestSupplemental nanConfigRequestSupp = {};
const auto& halStatus = HIDL_INVOKE(iwifiNanIface, enableRequest_1_6, inputCmdId,
@@ -545,7 +475,7 @@
// wait for a callback
ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_ENABLE_RESPONSE));
- ASSERT_EQ(NOTIFY_ENABLE_RESPONSE, callbackType);
+ ASSERT_EQ(0x1 << NOTIFY_ENABLE_RESPONSE, callbackEventBitMap & (0x1 << NOTIFY_ENABLE_RESPONSE));
ASSERT_EQ(id, inputCmdId);
ASSERT_EQ(status.status, NanStatusType::INVALID_ARGS);
}
@@ -572,7 +502,7 @@
*/
TEST_P(WifiNanIfaceHidlTest, configRequest_1_6InvalidArgs) {
uint16_t inputCmdId = 10;
- callbackType = INVALID;
+ callbackEventBitMap = INVALID;
::android::hardware::wifi::V1_4::NanConfigRequest nanConfigRequest = {};
::android::hardware::wifi::V1_6::NanConfigRequestSupplemental nanConfigRequestSupp = {};
const auto& halStatus = HIDL_INVOKE(iwifiNanIface, configRequest_1_6, inputCmdId,
@@ -583,7 +513,7 @@
// wait for a callback
ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_CONFIG_RESPONSE));
- ASSERT_EQ(NOTIFY_CONFIG_RESPONSE, callbackType);
+ ASSERT_EQ(0x1 << NOTIFY_CONFIG_RESPONSE, callbackEventBitMap & (0x1 << NOTIFY_CONFIG_RESPONSE));
ASSERT_EQ(id, inputCmdId);
ASSERT_EQ(status.status, NanStatusType::INVALID_ARGS);
}
@@ -610,12 +540,12 @@
*/
TEST_P(WifiNanIfaceHidlTest, notifyCapabilitiesResponse_1_6) {
uint16_t inputCmdId = 10;
- callbackType = INVALID;
+ callbackEventBitMap = INVALID;
const auto& halStatus = HIDL_INVOKE(iwifiNanIface, getCapabilitiesRequest_1_5, inputCmdId).code;
ASSERT_EQ(WifiStatusCode::SUCCESS, halStatus);
// wait for a callback
ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_CAPABILITIES_RESPONSE_1_6));
- ASSERT_EQ(NOTIFY_CAPABILITIES_RESPONSE_1_6, callbackType);
+ ASSERT_EQ(0x1 << NOTIFY_CAPABILITIES_RESPONSE_1_6, callbackEventBitMap & (0x1 << NOTIFY_CAPABILITIES_RESPONSE_1_6));
ASSERT_EQ(id, inputCmdId);
ASSERT_EQ(status.status, NanStatusType::SUCCESS);
@@ -711,7 +641,7 @@
nanConfigRequestSupp.V1_5.V1_2.numberOfSpatialStreamsInDiscovery = 0;
nanConfigRequestSupp.V1_5.V1_2.enableDiscoveryWindowEarlyTermination = false;
- callbackType = INVALID;
+ callbackEventBitMap = INVALID;
const auto& halStatus =
HIDL_INVOKE(iwifiNanIface, enableRequest_1_6, inputCmdId, req, nanConfigRequestSupp);
@@ -720,7 +650,7 @@
// wait for a callback
ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_ENABLE_RESPONSE));
- ASSERT_EQ(NOTIFY_ENABLE_RESPONSE, callbackType);
+ ASSERT_EQ(0x1 << NOTIFY_ENABLE_RESPONSE, callbackEventBitMap & (0x1 << NOTIFY_ENABLE_RESPONSE));
ASSERT_EQ(id, inputCmdId);
ASSERT_EQ(status.status, NanStatusType::SUCCESS);
}
@@ -749,7 +679,7 @@
// wait for a callback
ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_START_PUBLISH_RESPONSE));
- ASSERT_EQ(NOTIFY_START_PUBLISH_RESPONSE, callbackType);
+ ASSERT_EQ(0x1 << NOTIFY_START_PUBLISH_RESPONSE, callbackEventBitMap & (0x1 << NOTIFY_START_PUBLISH_RESPONSE));
ASSERT_EQ(id, inputCmdId + 1);
ASSERT_EQ(status.status, NanStatusType::SUCCESS);
}
@@ -760,7 +690,7 @@
*/
TEST_P(WifiNanIfaceHidlTest, respondToDataPathIndicationRequest_1_6ShimInvalidArgs) {
uint16_t inputCmdId = 10;
- callbackType = INVALID;
+ callbackEventBitMap = INVALID;
::android::hardware::wifi::V1_6::NanRespondToDataPathIndicationRequest
nanRespondToDataPathIndicationRequest = {};
nanRespondToDataPathIndicationRequest.ifaceName = "AwareinterfaceNameTooLong";
@@ -777,7 +707,7 @@
*/
TEST_P(WifiNanIfaceHidlTest, initiateDataPathRequest_1_6ShimInvalidArgs) {
uint16_t inputCmdId = 10;
- callbackType = INVALID;
+ callbackEventBitMap = INVALID;
::android::hardware::wifi::V1_6::NanInitiateDataPathRequest nanInitiateDataPathRequest = {};
nanInitiateDataPathRequest.ifaceName = "AwareinterfaceNameTooLong";
const auto& halStatus = HIDL_INVOKE(iwifiNanIface, initiateDataPathRequest_1_6, inputCmdId,
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/DriverAttentionMonitoringWarning.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AfcChannelAllowance.aidl
similarity index 85%
copy from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
copy to wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AfcChannelAllowance.aidl
index 758b251..4d3cd6e 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/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 DriverAttentionMonitoringWarning {
- OTHER = 0,
- NO_WARNING = 1,
- WARNING = 2,
+package android.hardware.wifi;
+@VintfStability
+parcelable AfcChannelAllowance {
+ android.hardware.wifi.AvailableAfcFrequencyInfo[] availableAfcFrequencyInfos;
+ android.hardware.wifi.AvailableAfcChannelInfo[] availableAfcChannelInfos;
+ long availabilityExpireTimeMs;
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcChannelInfo.aidl
similarity index 91%
rename from wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl
rename to wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcChannelInfo.aidl
index ea86c4f..d238640 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcChannelInfo.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@
package android.hardware.wifi;
@VintfStability
-parcelable WifiRadioCombinationMatrix {
- android.hardware.wifi.WifiRadioCombination[] radioCombinations;
+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 b27b06f..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();
- android.hardware.wifi.IWifiChip.ChipCapabilityMask getCapabilities();
+ int getFeatureSet();
android.hardware.wifi.WifiDebugHostWakeReasonStats getDebugHostWakeReasonStats();
android.hardware.wifi.WifiDebugRingBufferStatus[] getDebugRingBuffersStatus();
int getId();
@@ -58,10 +58,10 @@
String[] getP2pIfaceNames();
@PropagateAllowBlocking android.hardware.wifi.IWifiStaIface getStaIface(in String ifname);
String[] getStaIfaceNames();
- android.hardware.wifi.WifiRadioCombinationMatrix getSupportedRadioCombinationsMatrix();
+ android.hardware.wifi.WifiRadioCombination[] getSupportedRadioCombinations();
android.hardware.wifi.WifiChipCapabilities getWifiChipCapabilities();
- android.hardware.wifi.WifiUsableChannel[] getUsableChannels(in android.hardware.wifi.WifiBand band, in android.hardware.wifi.WifiIfaceMode ifaceModeMask, in android.hardware.wifi.IWifiChip.UsableChannelFilter filterMask);
- void setAfcChannelAllowance(in android.hardware.wifi.AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo);
+ android.hardware.wifi.WifiUsableChannel[] getUsableChannels(in android.hardware.wifi.WifiBand band, in int ifaceModeMask, in int filterMask);
+ 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);
@@ -73,7 +73,7 @@
byte[] requestFirmwareDebugDump();
void resetTxPowerScenario();
void selectTxPowerScenario(in android.hardware.wifi.IWifiChip.TxPowerScenario scenario);
- void setCoexUnsafeChannels(in android.hardware.wifi.IWifiChip.CoexUnsafeChannel[] unsafeChannels, in android.hardware.wifi.IWifiChip.CoexRestriction restrictions);
+ void setCoexUnsafeChannels(in android.hardware.wifi.IWifiChip.CoexUnsafeChannel[] unsafeChannels, in int restrictions);
void setCountryCode(in byte[2] code);
void setLatencyMode(in android.hardware.wifi.IWifiChip.LatencyMode mode);
void setMultiStaPrimaryConnection(in String ifName);
@@ -81,11 +81,11 @@
void startLoggingToDebugRingBuffer(in String ringName, in android.hardware.wifi.WifiDebugRingBufferVerboseLevel verboseLevel, in int maxIntervalInSec, in int minDataSizeInBytes);
void stopLoggingToDebugRingBuffer();
void triggerSubsystemRestart();
- void enableStaChannelForPeerNetwork(in android.hardware.wifi.IWifiChip.ChannelCategoryMask channelCategoryEnableFlag);
+ void enableStaChannelForPeerNetwork(in int channelCategoryEnableFlag);
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 31b6881..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();
- android.hardware.wifi.IWifiStaIface.StaIfaceCapabilityMask 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/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
index bb44679..a30893a 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
@@ -47,7 +47,7 @@
int maxAppInfoLen;
int maxQueuedTransmitFollowupMsgs;
int maxSubscribeInterfaceAddresses;
- android.hardware.wifi.NanCipherSuiteType supportedCipherSuites;
+ int supportedCipherSuites;
boolean instantCommunicationModeSupportFlag;
boolean supports6g;
boolean supportsHe;
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCipherSuiteType.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCipherSuiteType.aidl
index d1149c4..6f3158e 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCipherSuiteType.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCipherSuiteType.aidl
@@ -39,6 +39,6 @@
SHARED_KEY_256_MASK = (1 << 1) /* 2 */,
PUBLIC_KEY_2WDH_128_MASK = (1 << 2) /* 4 */,
PUBLIC_KEY_2WDH_256_MASK = (1 << 3) /* 8 */,
- PUBLIC_KEY_PASN_128_MASK = (1 << 4) /* 16 */,
- PUBLIC_KEY_PASN_256_MASK = (1 << 5) /* 32 */,
+ PUBLIC_KEY_PASN_128_MASK = (1 << 6) /* 64 */,
+ PUBLIC_KEY_PASN_256_MASK = (1 << 7) /* 128 */,
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
index e84cabf..96d940a 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
@@ -51,7 +51,7 @@
android.hardware.wifi.NanDataPathSecurityConfig securityConfig;
boolean rangingRequired;
int rangingIntervalMs;
- android.hardware.wifi.NanRangingIndication configRangingIndications;
+ int configRangingIndications;
char distanceIngressCm;
char distanceEgressCm;
boolean enableSessionSuspendability;
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl
index 6757bec..317489f 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl
@@ -47,7 +47,7 @@
boolean peerRequiresSecurityEnabledInNdp;
boolean peerRequiresRanging;
int rangingMeasurementInMm;
- android.hardware.wifi.NanRangingIndication rangingIndicationType;
+ int rangingIndicationType;
byte[] scid;
android.hardware.wifi.NanPairingConfig peerPairingConfig;
android.hardware.wifi.NanIdentityResolutionAttribute peerNira;
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl
index b49d406..4e9671a 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl
@@ -38,7 +38,7 @@
android.hardware.wifi.WifiBand band;
int[] frequencies;
int periodInMs;
- android.hardware.wifi.StaBackgroundScanBucketEventReportSchemeMask eventReportScheme;
+ int eventReportScheme;
int exponentialMaxPeriodInMs;
int exponentialBase;
int exponentialStepCount;
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaScanData.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaScanData.aidl
index 5903760..7c75232 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaScanData.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaScanData.aidl
@@ -34,7 +34,7 @@
package android.hardware.wifi;
@VintfStability
parcelable StaScanData {
- android.hardware.wifi.StaScanDataFlagMask flags;
+ int flags;
int bucketsScanned;
android.hardware.wifi.StaScanResult[] results;
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiUsableChannel.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiUsableChannel.aidl
index 94e3a8a..774b242 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiUsableChannel.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiUsableChannel.aidl
@@ -36,5 +36,5 @@
parcelable WifiUsableChannel {
int channel;
android.hardware.wifi.WifiChannelWidthInMhz channelBandwidth;
- android.hardware.wifi.WifiIfaceMode ifaceModeMask;
+ int ifaceModeMask;
}
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 de2449e..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;
@@ -31,7 +31,7 @@
import android.hardware.wifi.WifiDebugRingBufferStatus;
import android.hardware.wifi.WifiDebugRingBufferVerboseLevel;
import android.hardware.wifi.WifiIfaceMode;
-import android.hardware.wifi.WifiRadioCombinationMatrix;
+import android.hardware.wifi.WifiRadioCombination;
import android.hardware.wifi.WifiUsableChannel;
/**
@@ -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|
*/
- ChipCapabilityMask getCapabilities();
+ int getFeatureSet();
/**
* API to retrieve the wifi wake up reason stats for debugging.
@@ -737,8 +737,7 @@
* Retrieve the list of all the possible radio combinations supported by this
* chip.
*
- * @return A list of all the possible radio combinations represented by
- * |WifiRadioCombinationMatrix|.
+ * @return A list of all the possible radio combinations.
* For example, in case of a chip which has two radios, where one radio is
* capable of 2.4GHz 2X2 only and another radio which is capable of either
* 5GHz or 6GHz 2X2, the number of possible radio combinations in this case
@@ -759,7 +758,7 @@
* |WifiStatusCode.FAILURE_UNKNOWN|
*
*/
- WifiRadioCombinationMatrix getSupportedRadioCombinationsMatrix();
+ WifiRadioCombination[] getSupportedRadioCombinations();
/**
* Get capabilities supported by this chip.
@@ -809,19 +808,15 @@
* |WifiStatusCode.FAILURE_UNKNOWN|
*/
WifiUsableChannel[] getUsableChannels(
- in WifiBand band, in WifiIfaceMode ifaceModeMask, in UsableChannelFilter filterMask);
+ 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
@@ -983,8 +978,7 @@
* |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
*/
- void setCoexUnsafeChannels(
- in CoexUnsafeChannel[] unsafeChannels, in CoexRestriction restrictions);
+ void setCoexUnsafeChannels(in CoexUnsafeChannel[] unsafeChannels, in int restrictions);
/**
* Set country code for this Wifi chip.
@@ -1111,14 +1105,14 @@
* If the channel category is enabled and allowed by the regulatory, the HAL method
* getUsableChannels() will contain the current STA-connected channel if that channel belongs
* to that category.
- * @param channelCategoryEnableFlag bitmask of |ChannelCategoryMask|.
+ * @param channelCategoryEnableFlag Bitmask of |ChannelCategoryMask| values.
* For each bit, 1 enables the channel category and 0 disables that channel category.
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
* |WifiStatusCode.ERROR_NOT_SUPPORTED|,
* |WifiStatusCode.FAILURE_UNKNOWN|
*/
- void enableStaChannelForPeerNetwork(in ChannelCategoryMask channelCategoryEnableFlag);
+ void enableStaChannelForPeerNetwork(in int channelCategoryEnableFlag);
/**
* Multi-Link Operation modes.
diff --git a/wifi/aidl/android/hardware/wifi/IWifiNanIface.aidl b/wifi/aidl/android/hardware/wifi/IWifiNanIface.aidl
index 5f3ce6c..3ce8d02 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiNanIface.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiNanIface.aidl
@@ -79,6 +79,7 @@
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyCreateDataInterfaceResponse|.
*
* @param cmdId Command Id to use for this invocation.
+ * @param ifaceName The name of the interface, e.g. "aware0".
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_UNKNOWN|
@@ -90,6 +91,7 @@
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDeleteDataInterfaceResponse|.
*
* @param cmdId Command Id to use for this invocation.
+ * @param ifaceName The name of the interface, e.g. "aware0".
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_UNKNOWN|
diff --git a/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl b/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
index 8a61a9c..3649b7b 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiNanIfaceEventCallback.aidl
@@ -132,7 +132,7 @@
/**
* Callback providing status on a completed followup message transmit operation.
*
- * @param cmdId Command Id corresponding to the original |transmitFollowupRequest| request.
+ * @param id Command ID corresponding to the original |transmitFollowupRequest| request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.NO_OTA_ACK|
@@ -151,7 +151,7 @@
* Callback invoked in response to a capability request
* |IWifiNanIface.getCapabilitiesRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* @param capabilities Capability data.
@@ -162,7 +162,7 @@
/**
* Callback invoked in response to a config request |IWifiNanIface.configRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -175,7 +175,7 @@
* Callback invoked in response to a create data interface request
* |IWifiNanIface.createDataInterfaceRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -187,7 +187,7 @@
* Callback invoked in response to a delete data interface request
* |IWifiNanIface.deleteDataInterfaceRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -198,7 +198,7 @@
/**
* Callback invoked in response to a disable request |IWifiNanIface.disableRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.PROTOCOL_FAILURE|
@@ -208,7 +208,7 @@
/**
* Callback invoked in response to an enable request |IWifiNanIface.enableRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.ALREADY_ENABLED|
@@ -223,7 +223,7 @@
* Callback invoked in response to an initiate data path request
* |IWifiNanIface.initiateDataPathRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -238,7 +238,7 @@
* Callback invoked in response to a respond to data path indication request
* |IWifiNanIface.respondToDataPathIndicationRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -252,7 +252,7 @@
* Callback invoked to notify the status of the start publish request
* |IWifiNanIface.startPublishRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -267,7 +267,7 @@
* Callback invoked to notify the status of the start subscribe request
* |IWifiNanIface.startSubscribeRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -282,7 +282,7 @@
* Callback invoked in response to a stop publish request
* |IWifiNanIface.stopPublishRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_SESSION_ID|
@@ -294,7 +294,7 @@
* Callback invoked in response to a stop subscribe request
* |IWifiNanIface.stopSubscribeRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_SESSION_ID|
@@ -306,7 +306,7 @@
* Callback invoked in response to a terminate data path request
* |IWifiNanIface.terminateDataPathRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -320,7 +320,7 @@
* Callback invoked in response to a suspension request
* |IWifiNanIface.suspendRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_SESSION_ID|
@@ -333,7 +333,7 @@
* Callback invoked in response to a resume request
* |IWifiNanIface.resumeRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_SESSION_ID|
@@ -346,7 +346,7 @@
* Callback invoked in response to a transmit followup request
* |IWifiNanIface.transmitFollowupRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -377,7 +377,7 @@
* Callback invoked in response to an initiate NAN pairing request
* |IWifiNanIface.initiatePairingRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -392,7 +392,7 @@
* Callback invoked in response to a respond to NAN pairing indication request
* |IWifiNanIface.respondToPairingIndicationRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -422,7 +422,7 @@
* Callback invoked in response to an initiate NAN pairing bootstrapping request
* |IWifiNanIface.initiateBootstrappingRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
@@ -438,7 +438,7 @@
* Callback invoked in response to a respond to pairing bootstrapping indication request
* |IWifiNanIface.respondToBootstrappingIndicationRequest|.
*
- * @param cmdId Command Id corresponding to the original request.
+ * @param id Command ID corresponding to the original request.
* @param status NanStatus of the operation. Possible status codes are:
* |NanStatusCode.SUCCESS|
* |NanStatusCode.INVALID_ARGS|
diff --git a/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl b/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl
index 28d6a4d..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|
*/
- StaIfaceCapabilityMask 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/android/hardware/wifi/MacAddress.aidl b/wifi/aidl/android/hardware/wifi/MacAddress.aidl
index d59dfe3..d238565 100644
--- a/wifi/aidl/android/hardware/wifi/MacAddress.aidl
+++ b/wifi/aidl/android/hardware/wifi/MacAddress.aidl
@@ -20,8 +20,6 @@
* Byte array representing a Mac Address. Use when we need to
* pass an array of Mac Addresses to a method, as variable-sized
* 2D arrays are not supported in AIDL.
- *
- * TODO (b/210705533): Replace this type with a 2D byte array.
*/
@VintfStability
parcelable MacAddress {
diff --git a/wifi/aidl/android/hardware/wifi/NanBootstrappingConfirmInd.aidl b/wifi/aidl/android/hardware/wifi/NanBootstrappingConfirmInd.aidl
index 7d7a436..e72c940 100644
--- a/wifi/aidl/android/hardware/wifi/NanBootstrappingConfirmInd.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanBootstrappingConfirmInd.aidl
@@ -16,10 +16,12 @@
package android.hardware.wifi;
-import android.hardware.wifi.NanBootstrappingMethod;
import android.hardware.wifi.NanBootstrappingResponseCode;
import android.hardware.wifi.NanStatus;
+/**
+ * See Wi-Fi Aware R4.0 section 9.5.21.7
+ */
@VintfStability
parcelable NanBootstrappingConfirmInd {
/**
@@ -44,7 +46,7 @@
int comeBackDelay;
/**
- * Cookie received from the comeback response.
+ * Cookie received from peer with |comeBackDelay| for follow up |NanBootstrappingRequest|
*/
byte[] cookie;
}
diff --git a/wifi/aidl/android/hardware/wifi/NanBootstrappingMethod.aidl b/wifi/aidl/android/hardware/wifi/NanBootstrappingMethod.aidl
index 8960794..da2ff25 100644
--- a/wifi/aidl/android/hardware/wifi/NanBootstrappingMethod.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanBootstrappingMethod.aidl
@@ -17,7 +17,8 @@
package android.hardware.wifi;
/**
- * Pairing bootstrapping method flag
+ * Pairing bootstrapping method flag.
+ * See Wi-Fi Aware R4.0 section 9.5.21.7 table 128
*/
@VintfStability
@Backing(type="int")
diff --git a/wifi/aidl/android/hardware/wifi/NanBootstrappingRequest.aidl b/wifi/aidl/android/hardware/wifi/NanBootstrappingRequest.aidl
index 5297b9f..4b74cd9 100644
--- a/wifi/aidl/android/hardware/wifi/NanBootstrappingRequest.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanBootstrappingRequest.aidl
@@ -18,6 +18,9 @@
import android.hardware.wifi.NanBootstrappingMethod;
+/**
+ * See Wi-Fi Aware R4.0 section 9.5.21.7
+ */
@VintfStability
parcelable NanBootstrappingRequest {
/**
@@ -34,12 +37,12 @@
byte[6] peerDiscMacAddr;
/**
- * Bootstrapping method in the request, one of the |NanBootstrappingMethod|
+ * One of |NanBootstrappingMethod| indicating the bootstrapping method in the request.
*/
NanBootstrappingMethod requestBootstrappingMethod;
/**
- * Cookie for the follow up request
+ * Cookie received from previous |NanBootstrappingConfirmInd| for comeback request.
*/
byte[] cookie;
}
diff --git a/wifi/aidl/android/hardware/wifi/NanBootstrappingRequestInd.aidl b/wifi/aidl/android/hardware/wifi/NanBootstrappingRequestInd.aidl
index e11122f..6f43892 100644
--- a/wifi/aidl/android/hardware/wifi/NanBootstrappingRequestInd.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanBootstrappingRequestInd.aidl
@@ -21,7 +21,7 @@
/**
* NAN Data path request indication message structure.
* Event indication received by an intended Responder when a NAN
- * data request initiated by an Initiator.
+ * data request is initiated by an Initiator. See Wi-Fi Aware R4.0 section 9.5.21.7
*/
@VintfStability
parcelable NanBootstrappingRequestInd {
@@ -48,7 +48,7 @@
int bootstrappingInstanceId;
/**
- * Bootstrapping method in the incoming request, one of the |NanBootstrappingMethod|
+ * One of |NanBootstrappingMethod| indicating the bootstrapping method in the incoming request.
*/
NanBootstrappingMethod requestBootstrappingMethod;
}
diff --git a/wifi/aidl/android/hardware/wifi/NanBootstrappingResponse.aidl b/wifi/aidl/android/hardware/wifi/NanBootstrappingResponse.aidl
index 0a7d621..dbe8923 100644
--- a/wifi/aidl/android/hardware/wifi/NanBootstrappingResponse.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanBootstrappingResponse.aidl
@@ -16,8 +16,9 @@
package android.hardware.wifi;
-import android.hardware.wifi.NanBootstrappingMethod;
-
+/**
+ * See Wi-Fi Aware R4.0 section 9.5.21.7
+ */
@VintfStability
parcelable NanBootstrappingResponse {
/**
diff --git a/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl b/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
index c1d6201..f581c5e 100644
--- a/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
@@ -16,8 +16,6 @@
package android.hardware.wifi;
-import android.hardware.wifi.NanCipherSuiteType;
-
/**
* NDP Capabilities response.
*/
@@ -78,9 +76,9 @@
*/
int maxSubscribeInterfaceAddresses;
/**
- * The set of supported Cipher suites. The |NanCipherSuiteType| bit fields are used.
+ * Bitmap of |NanCipherSuiteType| values indicating the set of supported cipher suites.
*/
- NanCipherSuiteType supportedCipherSuites;
+ int supportedCipherSuites;
/**
* Flag to indicate if instant communication mode is supported.
*/
diff --git a/wifi/aidl/android/hardware/wifi/NanCipherSuiteType.aidl b/wifi/aidl/android/hardware/wifi/NanCipherSuiteType.aidl
index 0d2fc99..91b5caf 100644
--- a/wifi/aidl/android/hardware/wifi/NanCipherSuiteType.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanCipherSuiteType.aidl
@@ -17,13 +17,19 @@
package android.hardware.wifi;
/**
- * Cipher suite flags. Wi-Fi Aware Specification 4.0 section 7.1.2
+ * Cipher suite flags. Wi-Fi Aware Specification 4.0 section 9.5.21.1.
*/
@VintfStability
@Backing(type="int")
enum NanCipherSuiteType {
NONE = 0,
+ /**
+ * NCS-SK-128
+ */
SHARED_KEY_128_MASK = 1 << 0,
+ /**
+ * NCS-SK-256
+ */
SHARED_KEY_256_MASK = 1 << 1,
/**
* NCS-PK-2WDH-128
@@ -34,11 +40,15 @@
*/
PUBLIC_KEY_2WDH_256_MASK = 1 << 3,
/**
+ * bit 4 and bit 5 are reserved for NCS-GTK-CCMP-128 and NCS-GTK-CCMP-256. Which are not used
+ * from framework
+ */
+ /**
* NCS-PK-PASN-128
*/
- PUBLIC_KEY_PASN_128_MASK = 1 << 4,
+ PUBLIC_KEY_PASN_128_MASK = 1 << 6,
/**
* NCS-PK-PASN-256
*/
- PUBLIC_KEY_PASN_256_MASK = 1 << 5,
+ PUBLIC_KEY_PASN_256_MASK = 1 << 7,
}
diff --git a/wifi/aidl/android/hardware/wifi/NanDataPathSecurityConfig.aidl b/wifi/aidl/android/hardware/wifi/NanDataPathSecurityConfig.aidl
index 42a5616..9a2013b 100644
--- a/wifi/aidl/android/hardware/wifi/NanDataPathSecurityConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanDataPathSecurityConfig.aidl
@@ -31,7 +31,8 @@
*/
NanDataPathSecurityType securityType;
/**
- * Cipher type for data-paths. If |securityType| is |NanDataPathSecurityType.OPEN| then must
+ * One of |NanCipherSuiteType| indicating the cipher type for data-paths.
+ * If |securityType| is |NanDataPathSecurityType.OPEN|, then this must
* be set to |NanCipherSuiteType.NONE|. Otherwise a non-|NanCipherSuiteType.NONE| cipher suite
* must be specified.
*/
diff --git a/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl b/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
index e98658b..58777c5 100644
--- a/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
@@ -18,7 +18,6 @@
import android.hardware.wifi.NanDataPathSecurityConfig;
import android.hardware.wifi.NanMatchAlg;
-import android.hardware.wifi.NanRangingIndication;
/**
* Configurations of NAN discovery sessions. Common to publish and subscribe discovery.
@@ -143,10 +142,11 @@
*/
int rangingIntervalMs;
/**
- * The type of ranging feedback to be provided by discovery session matches
- * |IWifiNanIfaceEventCallback.eventMatch|. Only relevant if |rangingRequired| is true.
+ * Bitmap of |NanRangingIndication| values indicating the type of ranging feedback
+ * to be provided by discovery session matches in |IWifiNanIfaceEventCallback.eventMatch|.
+ * Only relevant if |rangingRequired| is true.
*/
- NanRangingIndication configRangingIndications;
+ int configRangingIndications;
/**
* The ingress and egress distance in cm. If ranging is enabled (|rangingEnabled| is true) then
* |configRangingIndications| is used to determine whether ingress and/or egress (or neither)
diff --git a/wifi/aidl/android/hardware/wifi/NanIdentityResolutionAttribute.aidl b/wifi/aidl/android/hardware/wifi/NanIdentityResolutionAttribute.aidl
index 917feff..807081b 100644
--- a/wifi/aidl/android/hardware/wifi/NanIdentityResolutionAttribute.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanIdentityResolutionAttribute.aidl
@@ -17,7 +17,8 @@
package android.hardware.wifi;
/**
- * NIRA for pairing identity resolution
+ * NIRA for pairing identity resolution.
+ * See Wi-Fi Aware R4.0 section 9.5.21.6
*/
@VintfStability
parcelable NanIdentityResolutionAttribute {
diff --git a/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl b/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl
index be2fa31..5a04376 100644
--- a/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl
@@ -19,7 +19,6 @@
import android.hardware.wifi.NanCipherSuiteType;
import android.hardware.wifi.NanIdentityResolutionAttribute;
import android.hardware.wifi.NanPairingConfig;
-import android.hardware.wifi.NanRangingIndication;
/**
* Match indication structure.
@@ -81,8 +80,9 @@
*/
byte rssiValue;
/**
- * Cipher type for data-paths constructed in the context of this discovery session. Valid if
- * |peerRequiresSecurityEnabledInNdp| is true.
+ * One of |NanCipherSuiteType| indicating the cipher type for data-paths constructed
+ * in the context of this discovery session.
+ * Valid if |peerRequiresSecurityEnabledInNdp| is true.
*/
NanCipherSuiteType peerCipherType;
/**
@@ -117,13 +117,14 @@
*/
int rangingMeasurementInMm;
/**
- * The ranging event(s) which triggered the ranging. e.g. can indicate that continuous ranging
- * was requested, or else that an ingress event occurred.
+ * Bitmap of |NanRangingIndication| values indicating the ranging event(s) which triggered the
+ * ranging. e.g. can indicate that continuous ranging was requested, or else that an ingress
+ * event occurred.
*/
- NanRangingIndication rangingIndicationType;
+ int rangingIndicationType;
/**
* Security Context Identifier attribute contains PMKID. Shall be included in NDP setup and
- * response messages. Security Context Identifie identifies the Security Context. For NAN
+ * response messages. Security Context Identifier identifies the Security Context. For NAN
* Shared Key Cipher Suite, this field contains the 16 octet PMKID identifying the PMK used for
* setting up the Secure Data Path.
*/
diff --git a/wifi/aidl/android/hardware/wifi/NanPairingAkm.aidl b/wifi/aidl/android/hardware/wifi/NanPairingAkm.aidl
index 31eeb2b..a823a3f 100644
--- a/wifi/aidl/android/hardware/wifi/NanPairingAkm.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanPairingAkm.aidl
@@ -17,6 +17,6 @@
package android.hardware.wifi;
/**
- * THe AKM used of NAN pairing
+ * The AKM used in the NAN pairing.
*/
@VintfStability @Backing(type="int") enum NanPairingAkm { SAE = 0, PASN=1 }
diff --git a/wifi/aidl/android/hardware/wifi/NanPairingConfig.aidl b/wifi/aidl/android/hardware/wifi/NanPairingConfig.aidl
index 4f9c3ae..609dac2 100644
--- a/wifi/aidl/android/hardware/wifi/NanPairingConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanPairingConfig.aidl
@@ -16,8 +16,6 @@
package android.hardware.wifi;
-import android.hardware.wifi.NanBootstrappingMethod;
-
/**
* The NAN pairing config
*/
@@ -36,7 +34,8 @@
*/
boolean enablePairingVerification;
/**
- * The set of supported bootstrapping methods. The |NanBootstrappingMethod| bit fields are used.
+ * Bitmap of |NanBootstrappingMethod| values indicating the set of
+ * supported bootstrapping methods.
*/
int supportedBootstrappingMethods;
}
diff --git a/wifi/aidl/android/hardware/wifi/NanPairingConfirmInd.aidl b/wifi/aidl/android/hardware/wifi/NanPairingConfirmInd.aidl
index cd98c72..a5670ec 100644
--- a/wifi/aidl/android/hardware/wifi/NanPairingConfirmInd.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanPairingConfirmInd.aidl
@@ -16,7 +16,6 @@
package android.hardware.wifi;
-import android.hardware.wifi.NanDataPathChannelInfo;
import android.hardware.wifi.NanPairingRequestType;
import android.hardware.wifi.NanStatus;
import android.hardware.wifi.NpkSecurityAssociation;
@@ -24,7 +23,7 @@
/**
* NAN pairing confirmation indication structure. Event indication is
* received on both initiator and responder side when negotiation for a
- * pairing finishes on success or failure.
+ * pairing finishes on success or failure. See Wi-Fi Aware R4.0 section 7.6.1.4
*/
@VintfStability
parcelable NanPairingConfirmInd {
diff --git a/wifi/aidl/android/hardware/wifi/NanPairingRequest.aidl b/wifi/aidl/android/hardware/wifi/NanPairingRequest.aidl
index 6f1a072..0c2080b 100644
--- a/wifi/aidl/android/hardware/wifi/NanPairingRequest.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanPairingRequest.aidl
@@ -20,9 +20,10 @@
import android.hardware.wifi.NanPairingSecurityConfig;
/**
- * NAN pairing initiate request
- * Which can be used for setup(the initial pairing request) or
- * verification(re-pairing for paired devices)
+ * NAN pairing initiate request.
+ * Can be used for setup (the initial pairing request) or
+ * verification (re-pairing for paired devices).
+ * See Wi-Fi Aware R4.0 section 7.6.1.1
*/
@VintfStability
parcelable NanPairingRequest {
diff --git a/wifi/aidl/android/hardware/wifi/NanPairingRequestInd.aidl b/wifi/aidl/android/hardware/wifi/NanPairingRequestInd.aidl
index f247e45..ec8548f 100644
--- a/wifi/aidl/android/hardware/wifi/NanPairingRequestInd.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanPairingRequestInd.aidl
@@ -22,7 +22,7 @@
/**
* NAN pairing request indication message structure.
* Event indication received by an intended Responder when a
- * pairing request initiated by an Initiator.
+ * pairing request is initiated by an Initiator. See Wi-Fi Aware R4.0 section 7.6.1.3
*/
@VintfStability
parcelable NanPairingRequestInd {
diff --git a/wifi/aidl/android/hardware/wifi/NanPairingSecurityConfig.aidl b/wifi/aidl/android/hardware/wifi/NanPairingSecurityConfig.aidl
index 7384e1a..a601751 100644
--- a/wifi/aidl/android/hardware/wifi/NanPairingSecurityConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanPairingSecurityConfig.aidl
@@ -49,8 +49,8 @@
*/
NanPairingAkm akm;
/**
- * Cipher type for pairing. Need to be one of the |NanCipherSuiteType.PUBLIC_KEY_PASN_128_MASK|
- * or |NanCipherSuiteType.PUBLIC_KEY_PASN_256_MASK|
+ * Cipher type for pairing. Must be one of |NanCipherSuiteType.PUBLIC_KEY_PASN_128_MASK|
+ * or |NanCipherSuiteType.PUBLIC_KEY_PASN_256_MASK|.
*/
NanCipherSuiteType cipherType;
}
diff --git a/wifi/aidl/android/hardware/wifi/NanRespondToPairingIndicationRequest.aidl b/wifi/aidl/android/hardware/wifi/NanRespondToPairingIndicationRequest.aidl
index 456b430..fab2a40 100644
--- a/wifi/aidl/android/hardware/wifi/NanRespondToPairingIndicationRequest.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanRespondToPairingIndicationRequest.aidl
@@ -21,6 +21,7 @@
/**
* Response to a pairing request from a peer.
+ * See Wi-Fi Aware R4.0 section 7.6.1.2
*/
@VintfStability
parcelable NanRespondToPairingIndicationRequest {
diff --git a/wifi/aidl/android/hardware/wifi/NanSuspensionModeChangeInd.aidl b/wifi/aidl/android/hardware/wifi/NanSuspensionModeChangeInd.aidl
index afabe8c..057e63b 100644
--- a/wifi/aidl/android/hardware/wifi/NanSuspensionModeChangeInd.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanSuspensionModeChangeInd.aidl
@@ -22,7 +22,7 @@
@VintfStability
parcelable NanSuspensionModeChangeInd {
/**
- * Indication whether the device has entered or existed the NAN suspension mode(deep sleep)
+ * Indication whether the device has entered or exited the NAN suspension mode(deep sleep)
*/
boolean isSuspended;
}
diff --git a/wifi/aidl/android/hardware/wifi/NpkSecurityAssociation.aidl b/wifi/aidl/android/hardware/wifi/NpkSecurityAssociation.aidl
index 32e8409..4d65a41 100644
--- a/wifi/aidl/android/hardware/wifi/NpkSecurityAssociation.aidl
+++ b/wifi/aidl/android/hardware/wifi/NpkSecurityAssociation.aidl
@@ -20,7 +20,7 @@
import android.hardware.wifi.NanPairingAkm;
/**
- * The security sssociation info after Aware Pairing setup.
+ * The security association info after Aware Pairing setup.
*/
@VintfStability
parcelable NpkSecurityAssociation {
@@ -37,12 +37,12 @@
*/
byte[32] npk;
/**
- * The AKM is used for key exchange in this security sssociation
+ * The AKM is used for key exchange in this security association
*/
NanPairingAkm akm;
/**
- * Cipher type for pairing. Need to one of the |NanCipherSuiteType.PUBLIC_KEY_PASN_128_MASK| or
- * |NanCipherSuiteType.PUBLIC_KEY_PASN_256_MASK|
+ * Cipher type for pairing. Must be one of |NanCipherSuiteType.PUBLIC_KEY_PASN_128_MASK| or
+ * |NanCipherSuiteType.PUBLIC_KEY_PASN_256_MASK|.
*/
NanCipherSuiteType cipherType;
}
diff --git a/wifi/aidl/android/hardware/wifi/Ssid.aidl b/wifi/aidl/android/hardware/wifi/Ssid.aidl
index fd985a3..230cef6 100644
--- a/wifi/aidl/android/hardware/wifi/Ssid.aidl
+++ b/wifi/aidl/android/hardware/wifi/Ssid.aidl
@@ -20,8 +20,6 @@
* Byte array representing an Ssid. Use when we need to
* pass an array of Ssid's to a method, as variable-sized
* 2D arrays are not supported in AIDL.
- *
- * TODO (b/210705533): Replace this type with a 2D byte array.
*/
@VintfStability
parcelable Ssid {
diff --git a/wifi/aidl/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl b/wifi/aidl/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl
index 7bd87b2..76b510d 100644
--- a/wifi/aidl/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl
+++ b/wifi/aidl/android/hardware/wifi/StaBackgroundScanBucketParameters.aidl
@@ -16,7 +16,6 @@
package android.hardware.wifi;
-import android.hardware.wifi.StaBackgroundScanBucketEventReportSchemeMask;
import android.hardware.wifi.WifiBand;
/**
@@ -50,7 +49,7 @@
* Bitset of |StaBackgroundScanBucketEventReportSchemeMask| values controlling
* when events for this bucket must be reported.
*/
- StaBackgroundScanBucketEventReportSchemeMask eventReportScheme;
+ int eventReportScheme;
/**
* For exponential back off. If |exponentialMaxPeriodInMs| is non-zero or
* different than period, then this bucket is an exponential backoff bucket
diff --git a/wifi/aidl/android/hardware/wifi/StaScanData.aidl b/wifi/aidl/android/hardware/wifi/StaScanData.aidl
index 9d6bd53..abc5638 100644
--- a/wifi/aidl/android/hardware/wifi/StaScanData.aidl
+++ b/wifi/aidl/android/hardware/wifi/StaScanData.aidl
@@ -16,7 +16,6 @@
package android.hardware.wifi;
-import android.hardware.wifi.StaScanDataFlagMask;
import android.hardware.wifi.StaScanResult;
/**
@@ -26,9 +25,9 @@
@VintfStability
parcelable StaScanData {
/**
- * Bitset containing |ScanDataFlagMask| values.
+ * Bitset of |ScanDataFlagMask| values.
*/
- StaScanDataFlagMask flags;
+ int flags;
/**
* Bitset where each bit indicates if the bucket with that index (starting at
* 0) was scanned.
diff --git a/wifi/aidl/android/hardware/wifi/WifiRadioCombinationMatrix.aidl b/wifi/aidl/android/hardware/wifi/WifiRadioCombinationMatrix.aidl
deleted file mode 100644
index b79a818..0000000
--- a/wifi/aidl/android/hardware/wifi/WifiRadioCombinationMatrix.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.wifi;
-
-import android.hardware.wifi.WifiRadioCombination;
-
-/**
- * Wifi radio combinations matrix retrieved via
- * |IWifiChip.getSupportedRadioCombinationsMatrix|.
- */
-@VintfStability
-parcelable WifiRadioCombinationMatrix {
- /**
- * List of all the possible radio combinations that the chip can operate.
- */
- WifiRadioCombination[] radioCombinations;
-}
diff --git a/wifi/aidl/android/hardware/wifi/WifiUsableChannel.aidl b/wifi/aidl/android/hardware/wifi/WifiUsableChannel.aidl
index d92e4cc..077c17e 100644
--- a/wifi/aidl/android/hardware/wifi/WifiUsableChannel.aidl
+++ b/wifi/aidl/android/hardware/wifi/WifiUsableChannel.aidl
@@ -17,7 +17,6 @@
package android.hardware.wifi;
import android.hardware.wifi.WifiChannelWidthInMhz;
-import android.hardware.wifi.WifiIfaceMode;
/**
* Wifi usable channel information.
@@ -33,7 +32,8 @@
*/
WifiChannelWidthInMhz channelBandwidth;
/**
- * Iface modes feasible on this channel.
+ * Iface modes feasible on this channel, represented as a bitmask
+ * of |WifiIfaceMode| values.
*/
- WifiIfaceMode ifaceModeMask;
+ int ifaceModeMask;
}
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index d3cf7bf..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));
}
}
@@ -408,8 +407,8 @@
aidl_usable_channel->channel = legacy_usable_channel.freq;
aidl_usable_channel->channelBandwidth =
convertLegacyWifiChannelWidthToAidl(legacy_usable_channel.width);
- aidl_usable_channel->ifaceModeMask = static_cast<WifiIfaceMode>(
- convertLegacyWifiInterfaceModeToAidl(legacy_usable_channel.iface_mode_mask));
+ aidl_usable_channel->ifaceModeMask =
+ convertLegacyWifiInterfaceModeToAidl(legacy_usable_channel.iface_mode_mask);
return true;
}
@@ -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;
}
@@ -572,7 +570,7 @@
legacy_bucket_spec.report_events = 0;
using AidlFlag = StaBackgroundScanBucketEventReportSchemeMask;
for (const auto flag : {AidlFlag::EACH_SCAN, AidlFlag::FULL_RESULTS, AidlFlag::NO_BATCH}) {
- if (static_cast<int32_t>(aidl_bucket_spec.eventReportScheme) &
+ if (aidl_bucket_spec.eventReportScheme &
static_cast<std::underlying_type<AidlFlag>::type>(flag)) {
legacy_bucket_spec.report_events |= convertAidlGscanReportEventFlagToLegacy(flag);
}
@@ -678,7 +676,7 @@
convertLegacyGscanDataFlagToAidl(flag));
}
}
- aidl_scan_data->flags = static_cast<StaScanDataFlagMask>(flags);
+ aidl_scan_data->flags = flags;
aidl_scan_data->bucketsScanned = legacy_cached_scan_result.buckets_scanned;
CHECK(legacy_cached_scan_result.num_results >= 0 &&
@@ -1787,7 +1785,7 @@
: legacy_hal::NAN_RANGING_DISABLE;
legacy_request->ranging_cfg.ranging_interval_msec = aidl_request.baseConfigs.rangingIntervalMs;
legacy_request->ranging_cfg.config_ranging_indications =
- static_cast<uint32_t>(aidl_request.baseConfigs.configRangingIndications);
+ aidl_request.baseConfigs.configRangingIndications;
legacy_request->ranging_cfg.distance_ingress_mm =
aidl_request.baseConfigs.distanceIngressCm * 10;
legacy_request->ranging_cfg.distance_egress_mm = aidl_request.baseConfigs.distanceEgressCm * 10;
@@ -1919,7 +1917,7 @@
: legacy_hal::NAN_RANGING_DISABLE;
legacy_request->ranging_cfg.ranging_interval_msec = aidl_request.baseConfigs.rangingIntervalMs;
legacy_request->ranging_cfg.config_ranging_indications =
- static_cast<uint32_t>(aidl_request.baseConfigs.configRangingIndications);
+ aidl_request.baseConfigs.configRangingIndications;
legacy_request->ranging_cfg.distance_ingress_mm =
aidl_request.baseConfigs.distanceIngressCm * 10;
legacy_request->ranging_cfg.distance_egress_mm = aidl_request.baseConfigs.distanceEgressCm * 10;
@@ -2202,8 +2200,7 @@
aidl_response->maxQueuedTransmitFollowupMsgs =
legacy_response.max_queued_transmit_followup_msgs;
aidl_response->maxSubscribeInterfaceAddresses = legacy_response.max_subscribe_address;
- aidl_response->supportedCipherSuites =
- static_cast<NanCipherSuiteType>(legacy_response.cipher_suites_supported);
+ aidl_response->supportedCipherSuites = legacy_response.cipher_suites_supported;
aidl_response->instantCommunicationModeSupportFlag = legacy_response.is_instant_mode_supported;
aidl_response->supports6g = legacy_response.is_6g_supported;
aidl_response->supportsHe = legacy_response.is_he_supported;
@@ -2244,8 +2241,7 @@
aidl_ind->peerRequiresRanging =
legacy_ind.peer_sdea_params.ranging_state == legacy_hal::NAN_RANGING_ENABLE;
aidl_ind->rangingMeasurementInMm = legacy_ind.range_info.range_measurement_mm;
- aidl_ind->rangingIndicationType =
- static_cast<NanRangingIndication>(legacy_ind.range_info.ranging_event_type);
+ aidl_ind->rangingIndicationType = legacy_ind.range_info.ranging_event_type;
aidl_ind->scid = std::vector<uint8_t>(legacy_ind.scid, legacy_ind.scid + legacy_ind.scid_len);
if (!convertLegacyNiraToAidl(legacy_ind.nira, &aidl_ind->peerNira)) {
@@ -2996,14 +2992,13 @@
bool convertLegacyRadioCombinationsMatrixToAidl(
legacy_hal::wifi_radio_combination_matrix* legacy_matrix,
- WifiRadioCombinationMatrix* aidl_matrix) {
- if (!aidl_matrix || !legacy_matrix) {
+ std::vector<WifiRadioCombination>* aidl_combinations) {
+ if (!aidl_combinations || !legacy_matrix) {
return false;
}
- *aidl_matrix = {};
+ *aidl_combinations = {};
int num_combinations = legacy_matrix->num_radio_combinations;
- std::vector<WifiRadioCombination> radio_combinations_vec;
if (!num_combinations) {
LOG(ERROR) << "zero radio combinations";
return false;
@@ -3029,13 +3024,12 @@
radio_configurations_vec.push_back(radioConfiguration);
}
radioCombination.radioConfigurations = radio_configurations_vec;
- radio_combinations_vec.push_back(radioCombination);
+ aidl_combinations->push_back(radioCombination);
l_radio_combinations_ptr =
(wifi_radio_combination*)((u8*)l_radio_combinations_ptr +
sizeof(wifi_radio_combination) +
(sizeof(wifi_radio_configuration) * num_configurations));
}
- aidl_matrix->radioCombinations = radio_combinations_vec;
return true;
}
diff --git a/wifi/aidl/default/aidl_struct_util.h b/wifi/aidl/default/aidl_struct_util.h
index 208b734..e4ff963 100644
--- a/wifi/aidl/default/aidl_struct_util.h
+++ b/wifi/aidl/default/aidl_struct_util.h
@@ -20,7 +20,10 @@
#include <aidl/android/hardware/wifi/IWifiChip.h>
#include <aidl/android/hardware/wifi/IWifiChipEventCallback.h>
#include <aidl/android/hardware/wifi/NanBandIndex.h>
+#include <aidl/android/hardware/wifi/StaBackgroundScanBucketEventReportSchemeMask.h>
+#include <aidl/android/hardware/wifi/StaScanDataFlagMask.h>
#include <aidl/android/hardware/wifi/WifiDebugRingBufferFlags.h>
+#include <aidl/android/hardware/wifi/WifiIfaceMode.h>
#include <vector>
@@ -37,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);
@@ -64,14 +67,14 @@
std::vector<legacy_hal::wifi_coex_unsafe_channel>* legacy_unsafe_channels);
bool convertLegacyRadioCombinationsMatrixToAidl(
legacy_hal::wifi_radio_combination_matrix* legacy_matrix,
- WifiRadioCombinationMatrix* aidl_matrix);
+ std::vector<WifiRadioCombination>* aidl_combinations);
WifiBand convertLegacyMacBandToAidlWifiBand(uint32_t band);
WifiAntennaMode convertLegacyAntennaConfigurationToAidl(uint32_t antenna_cfg);
bool convertLegacyIfaceCombinationsMatrixToChipMode(
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 9997937..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,
@@ -753,21 +753,22 @@
sizeof(radio_configurations_array3) / sizeof(radio_configurations_array3[0]),
radio_configurations_array3);
- WifiRadioCombinationMatrix converted_matrix{};
- aidl_struct_util::convertLegacyRadioCombinationsMatrixToAidl(legacy_matrix, &converted_matrix);
+ std::vector<WifiRadioCombination> converted_combinations;
+ aidl_struct_util::convertLegacyRadioCombinationsMatrixToAidl(legacy_matrix,
+ &converted_combinations);
// Verify the conversion
- EXPECT_EQ(legacy_matrix->num_radio_combinations, converted_matrix.radioCombinations.size());
+ EXPECT_EQ(legacy_matrix->num_radio_combinations, converted_combinations.size());
verifyRadioCombination(
- &converted_matrix.radioCombinations[0],
+ &converted_combinations[0],
sizeof(radio_configurations_array1) / sizeof(radio_configurations_array1[0]),
radio_configurations_array1);
verifyRadioCombination(
- &converted_matrix.radioCombinations[1],
+ &converted_combinations[1],
sizeof(radio_configurations_array2) / sizeof(radio_configurations_array2[0]),
radio_configurations_array2);
verifyRadioCombination(
- &converted_matrix.radioCombinations[2],
+ &converted_combinations[2],
sizeof(radio_configurations_array3) / sizeof(radio_configurations_array3[0]),
radio_configurations_array3);
}
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 bb3eaf0..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(IWifiChip::ChipCapabilityMask* _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) {
@@ -681,7 +681,7 @@
ndk::ScopedAStatus WifiChip::setCoexUnsafeChannels(
const std::vector<IWifiChip::CoexUnsafeChannel>& in_unsafeChannels,
- CoexRestriction in_restrictions) {
+ int32_t in_restrictions) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
&WifiChip::setCoexUnsafeChannelsInternal, in_unsafeChannels,
in_restrictions);
@@ -692,8 +692,8 @@
&WifiChip::setCountryCodeInternal, in_code);
}
-ndk::ScopedAStatus WifiChip::getUsableChannels(WifiBand in_band, WifiIfaceMode in_ifaceModeMask,
- UsableChannelFilter in_filterMask,
+ndk::ScopedAStatus WifiChip::getUsableChannels(WifiBand in_band, int32_t in_ifaceModeMask,
+ int32_t in_filterMask,
std::vector<WifiUsableChannel>* _aidl_return) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
&WifiChip::getUsableChannelsInternal, _aidl_return, in_band,
@@ -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() {
@@ -711,10 +711,10 @@
&WifiChip::triggerSubsystemRestartInternal);
}
-ndk::ScopedAStatus WifiChip::getSupportedRadioCombinationsMatrix(
- WifiRadioCombinationMatrix* _aidl_return) {
+ndk::ScopedAStatus WifiChip::getSupportedRadioCombinations(
+ std::vector<WifiRadioCombination>* _aidl_return) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
- &WifiChip::getSupportedRadioCombinationsMatrixInternal, _aidl_return);
+ &WifiChip::getSupportedRadioCombinationsInternal, _aidl_return);
}
ndk::ScopedAStatus WifiChip::getWifiChipCapabilities(WifiChipCapabilities* _aidl_return) {
@@ -722,8 +722,7 @@
&WifiChip::getWifiChipCapabilitiesInternal, _aidl_return);
}
-ndk::ScopedAStatus WifiChip::enableStaChannelForPeerNetwork(
- ChannelCategoryMask in_channelCategoryEnableFlag) {
+ndk::ScopedAStatus WifiChip::enableStaChannelForPeerNetwork(int32_t in_channelCategoryEnableFlag) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
&WifiChip::enableStaChannelForPeerNetworkInternal,
in_channelCategoryEnableFlag);
@@ -787,7 +786,7 @@
return ndk::ScopedAStatus::ok();
}
-std::pair<IWifiChip::ChipCapabilityMask, 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;
@@ -795,7 +794,7 @@
std::tie(legacy_status, legacy_feature_set) =
legacy_hal_.lock()->getSupportedFeatureSet(ifname);
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
- return {IWifiChip::ChipCapabilityMask{}, createWifiStatusFromLegacyError(legacy_status)};
+ return {0, createWifiStatusFromLegacyError(legacy_status)};
}
std::tie(legacy_status, legacy_logger_feature_set) =
legacy_hal_.lock()->getLoggerSupportedFeatureSet(ifname);
@@ -803,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)) {
- return {IWifiChip::ChipCapabilityMask{}, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
+ uint32_t aidl_feature_set;
+ if (!aidl_struct_util::convertLegacyChipFeaturesToAidl(legacy_feature_set, &aidl_feature_set)) {
+ return {0, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
}
- return {static_cast<IWifiChip::ChipCapabilityMask>(aidl_caps), ndk::ScopedAStatus::ok()};
+ return {aidl_feature_set, ndk::ScopedAStatus::ok()};
}
std::pair<std::vector<IWifiChip::ChipMode>, ndk::ScopedAStatus>
@@ -1385,13 +1383,12 @@
}
ndk::ScopedAStatus WifiChip::setCoexUnsafeChannelsInternal(
- std::vector<IWifiChip::CoexUnsafeChannel> unsafe_channels, CoexRestriction restrictions) {
+ std::vector<IWifiChip::CoexUnsafeChannel> unsafe_channels, int32_t aidl_restrictions) {
std::vector<legacy_hal::wifi_coex_unsafe_channel> legacy_unsafe_channels;
if (!aidl_struct_util::convertAidlVectorOfCoexUnsafeChannelToLegacy(unsafe_channels,
&legacy_unsafe_channels)) {
return createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS);
}
- uint32_t aidl_restrictions = static_cast<uint32_t>(restrictions);
uint32_t legacy_restrictions = 0;
if (aidl_restrictions & static_cast<uint32_t>(CoexRestriction::WIFI_DIRECT)) {
legacy_restrictions |= legacy_hal::wifi_coex_restriction::WIFI_DIRECT;
@@ -1413,15 +1410,13 @@
}
std::pair<std::vector<WifiUsableChannel>, ndk::ScopedAStatus> WifiChip::getUsableChannelsInternal(
- WifiBand band, WifiIfaceMode ifaceModeMask, UsableChannelFilter filterMask) {
+ WifiBand band, int32_t ifaceModeMask, int32_t filterMask) {
legacy_hal::wifi_error legacy_status;
std::vector<legacy_hal::wifi_usable_channel> legacy_usable_channels;
std::tie(legacy_status, legacy_usable_channels) = legacy_hal_.lock()->getUsableChannels(
aidl_struct_util::convertAidlWifiBandToLegacyMacBand(band),
- aidl_struct_util::convertAidlWifiIfaceModeToLegacy(
- static_cast<uint32_t>(ifaceModeMask)),
- aidl_struct_util::convertAidlUsableChannelFilterToLegacy(
- static_cast<uint32_t>(filterMask)));
+ aidl_struct_util::convertAidlWifiIfaceModeToLegacy(ifaceModeMask),
+ aidl_struct_util::convertAidlUsableChannelFilterToLegacy(filterMask));
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
return {std::vector<WifiUsableChannel>(), createWifiStatusFromLegacyError(legacy_status)};
@@ -1435,31 +1430,35 @@
}
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);
}
-std::pair<WifiRadioCombinationMatrix, ndk::ScopedAStatus>
-WifiChip::getSupportedRadioCombinationsMatrixInternal() {
+std::pair<std::vector<WifiRadioCombination>, ndk::ScopedAStatus>
+WifiChip::getSupportedRadioCombinationsInternal() {
legacy_hal::wifi_error legacy_status;
legacy_hal::wifi_radio_combination_matrix* legacy_matrix;
+ std::vector<WifiRadioCombination> aidl_combinations;
std::tie(legacy_status, legacy_matrix) =
legacy_hal_.lock()->getSupportedRadioCombinationsMatrix();
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
LOG(ERROR) << "Failed to get SupportedRadioCombinations matrix from legacy HAL: "
<< legacyErrorToString(legacy_status);
- return {WifiRadioCombinationMatrix{}, createWifiStatusFromLegacyError(legacy_status)};
+ return {aidl_combinations, createWifiStatusFromLegacyError(legacy_status)};
}
- WifiRadioCombinationMatrix aidl_matrix;
if (!aidl_struct_util::convertLegacyRadioCombinationsMatrixToAidl(legacy_matrix,
- &aidl_matrix)) {
+ &aidl_combinations)) {
LOG(ERROR) << "Failed convertLegacyRadioCombinationsMatrixToAidl() ";
- return {WifiRadioCombinationMatrix(), createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS)};
+ return {aidl_combinations, createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS)};
}
- return {aidl_matrix, ndk::ScopedAStatus::ok()};
+ return {aidl_combinations, ndk::ScopedAStatus::ok()};
}
std::pair<WifiChipCapabilities, ndk::ScopedAStatus> WifiChip::getWifiChipCapabilitiesInternal() {
@@ -1483,10 +1482,9 @@
}
ndk::ScopedAStatus WifiChip::enableStaChannelForPeerNetworkInternal(
- ChannelCategoryMask channelCategoryEnableFlag) {
+ int32_t channelCategoryEnableFlag) {
auto legacy_status = legacy_hal_.lock()->enableStaChannelForPeerNetwork(
- aidl_struct_util::convertAidlChannelCategoryToLegacy(
- static_cast<uint32_t>(channelCategoryEnableFlag)));
+ aidl_struct_util::convertAidlChannelCategoryToLegacy(channelCategoryEnableFlag));
return createWifiStatusFromLegacyError(legacy_status);
}
diff --git a/wifi/aidl/default/wifi_chip.h b/wifi/aidl/default/wifi_chip.h
index def5da0..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(IWifiChip::ChipCapabilityMask* _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;
@@ -136,19 +136,19 @@
ndk::ScopedAStatus setMultiStaUseCase(IWifiChip::MultiStaUseCase in_useCase) override;
ndk::ScopedAStatus setCoexUnsafeChannels(
const std::vector<IWifiChip::CoexUnsafeChannel>& in_unsafeChannels,
- CoexRestriction in_restrictions) override;
+ int32_t in_restrictions) override;
ndk::ScopedAStatus setCountryCode(const std::array<uint8_t, 2>& in_code) override;
- ndk::ScopedAStatus getUsableChannels(WifiBand in_band, WifiIfaceMode in_ifaceModeMask,
- UsableChannelFilter in_filterMask,
+ ndk::ScopedAStatus getUsableChannels(WifiBand in_band, int32_t in_ifaceModeMask,
+ 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 getSupportedRadioCombinationsMatrix(
- WifiRadioCombinationMatrix* _aidl_return) override;
+ ndk::ScopedAStatus getSupportedRadioCombinations(
+ std::vector<WifiRadioCombination>* _aidl_return) override;
ndk::ScopedAStatus getWifiChipCapabilities(WifiChipCapabilities* _aidl_return) override;
ndk::ScopedAStatus enableStaChannelForPeerNetwork(
- ChannelCategoryMask in_channelCategoryEnableFlag) override;
+ int32_t in_channelCategoryEnableFlag) override;
binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
ndk::ScopedAStatus setMloMode(const ChipMloMode in_mode) override;
@@ -162,7 +162,7 @@
std::pair<int32_t, ndk::ScopedAStatus> getIdInternal();
ndk::ScopedAStatus registerEventCallbackInternal(
const std::shared_ptr<IWifiChipEventCallback>& event_callback);
- std::pair<IWifiChip::ChipCapabilityMask, 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);
@@ -214,15 +214,13 @@
ndk::ScopedAStatus setMultiStaPrimaryConnectionInternal(const std::string& ifname);
ndk::ScopedAStatus setMultiStaUseCaseInternal(IWifiChip::MultiStaUseCase use_case);
ndk::ScopedAStatus setCoexUnsafeChannelsInternal(
- std::vector<IWifiChip::CoexUnsafeChannel> unsafe_channels,
- CoexRestriction restrictions);
+ std::vector<IWifiChip::CoexUnsafeChannel> unsafe_channels, int32_t restrictions);
ndk::ScopedAStatus setCountryCodeInternal(const std::array<uint8_t, 2>& in_code);
std::pair<std::vector<WifiUsableChannel>, ndk::ScopedAStatus> getUsableChannelsInternal(
- WifiBand band, WifiIfaceMode ifaceModeMask, UsableChannelFilter filterMask);
- ndk::ScopedAStatus enableStaChannelForPeerNetworkInternal(
- ChannelCategoryMask channelCategoryEnableFlag);
+ 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();
@@ -258,8 +256,8 @@
void invalidateAndClearBridgedAp(const std::string& br_name);
bool findUsingNameFromBridgedApInstances(const std::string& name);
ndk::ScopedAStatus triggerSubsystemRestartInternal();
- std::pair<WifiRadioCombinationMatrix, ndk::ScopedAStatus>
- getSupportedRadioCombinationsMatrixInternal();
+ std::pair<std::vector<WifiRadioCombination>, ndk::ScopedAStatus>
+ getSupportedRadioCombinationsInternal();
std::pair<WifiChipCapabilities, ndk::ScopedAStatus> getWifiChipCapabilitiesInternal();
ndk::ScopedAStatus setMloModeInternal(const ChipMloMode in_mode);
void retrieveDynamicIfaceCombination();
diff --git a/wifi/aidl/default/wifi_sta_iface.cpp b/wifi/aidl/default/wifi_sta_iface.cpp
index 300316a..800813f 100644
--- a/wifi/aidl/default/wifi_sta_iface.cpp
+++ b/wifi/aidl/default/wifi_sta_iface.cpp
@@ -82,10 +82,9 @@
&WifiStaIface::registerEventCallbackInternal, in_callback);
}
-ndk::ScopedAStatus WifiStaIface::getCapabilities(
- IWifiStaIface::StaIfaceCapabilityMask* _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(
@@ -110,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,
@@ -239,24 +231,20 @@
return ndk::ScopedAStatus::ok();
}
-std::pair<IWifiStaIface::StaIfaceCapabilityMask, 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) =
legacy_hal_.lock()->getSupportedFeatureSet(ifname_);
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
- return {IWifiStaIface::StaIfaceCapabilityMask{},
- createWifiStatusFromLegacyError(legacy_status)};
+ return {0, createWifiStatusFromLegacyError(legacy_status)};
}
- uint32_t aidl_caps;
- if (!aidl_struct_util::convertLegacyFeaturesToAidlStaCapabilities(legacy_feature_set,
- &aidl_caps)) {
- return {IWifiStaIface::StaIfaceCapabilityMask{},
- createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
+ uint32_t aidl_feature_set;
+ if (!aidl_struct_util::convertLegacyStaIfaceFeaturesToAidl(legacy_feature_set,
+ &aidl_feature_set)) {
+ return {0, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
}
- return {static_cast<IWifiStaIface::StaIfaceCapabilityMask>(aidl_caps),
- ndk::ScopedAStatus::ok()};
+ return {aidl_feature_set, ndk::ScopedAStatus::ok()};
}
std::pair<StaApfPacketFilterCapabilities, ndk::ScopedAStatus>
@@ -303,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 2e4403a..3d7ec4d 100644
--- a/wifi/aidl/default/wifi_sta_iface.h
+++ b/wifi/aidl/default/wifi_sta_iface.h
@@ -54,16 +54,13 @@
ndk::ScopedAStatus getName(std::string* _aidl_return) override;
ndk::ScopedAStatus registerEventCallback(
const std::shared_ptr<IWifiStaIfaceEventCallback>& in_callback) override;
- ndk::ScopedAStatus getCapabilities(
- IWifiStaIface::StaIfaceCapabilityMask* _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;
@@ -99,15 +96,13 @@
std::pair<std::string, ndk::ScopedAStatus> getNameInternal();
ndk::ScopedAStatus registerEventCallbackInternal(
const std::shared_ptr<IWifiStaIfaceEventCallback>& callback);
- std::pair<IWifiStaIface::StaIfaceCapabilityMask, 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 463545b..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) {
- IWifiChip::ChipCapabilityMask caps = {};
- if (wifi_chip->getCapabilities(&caps).isOk()) {
- return static_cast<int32_t>(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 f908be6..ca88d8e 100644
--- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
@@ -22,6 +22,7 @@
#include <aidl/Vintf.h>
#include <aidl/android/hardware/wifi/BnWifi.h>
#include <aidl/android/hardware/wifi/BnWifiChipEventCallback.h>
+#include <aidl/android/hardware/wifi/WifiIfaceMode.h>
#include <android/binder_manager.h>
#include <android/binder_status.h>
#include <binder/IServiceManager.h>
@@ -41,7 +42,7 @@
using aidl::android::hardware::wifi::WifiDebugRingBufferStatus;
using aidl::android::hardware::wifi::WifiDebugRingBufferVerboseLevel;
using aidl::android::hardware::wifi::WifiIfaceMode;
-using aidl::android::hardware::wifi::WifiRadioCombinationMatrix;
+using aidl::android::hardware::wifi::WifiRadioCombination;
using aidl::android::hardware::wifi::WifiStatusCode;
using aidl::android::hardware::wifi::WifiUsableChannel;
@@ -184,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);
}
/*
@@ -232,9 +233,7 @@
std::vector<WifiUsableChannel> channels;
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- auto status = wifi_chip_->getUsableChannels(
- band, static_cast<WifiIfaceMode>(ifaceModeMask),
- static_cast<IWifiChip::UsableChannelFilter>(filterMask), &channels);
+ auto status = wifi_chip_->getUsableChannels(band, ifaceModeMask, filterMask, &channels);
if (checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED)) {
GTEST_SKIP() << "getUsableChannels() is not supported by vendor.";
}
@@ -242,14 +241,14 @@
}
/*
- * GetSupportedRadioCombinationsMatrix
+ * GetSupportedRadioCombinations
*/
-TEST_P(WifiChipAidlTest, GetSupportedRadioCombinationsMatrix) {
- WifiRadioCombinationMatrix combination_matrix = {};
+TEST_P(WifiChipAidlTest, GetSupportedRadioCombinations) {
+ std::vector<WifiRadioCombination> combinations;
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- auto status = wifi_chip_->getSupportedRadioCombinationsMatrix(&combination_matrix);
+ auto status = wifi_chip_->getSupportedRadioCombinations(&combinations);
if (checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED)) {
- GTEST_SKIP() << "Skipping this test since getSupportedRadioCombinationsMatrix() "
+ GTEST_SKIP() << "Skipping this test since getSupportedRadioCombinations() "
"is not supported by vendor.";
}
EXPECT_TRUE(status.isOk());
@@ -270,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));
@@ -285,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));
@@ -337,7 +336,7 @@
// Test with an empty vector of CoexUnsafeChannels.
std::vector<IWifiChip::CoexUnsafeChannel> vec;
- IWifiChip::CoexRestriction restrictions = static_cast<IWifiChip::CoexRestriction>(0);
+ int restrictions = 0;
auto status = wifi_chip_->setCoexUnsafeChannels(vec, restrictions);
if (!status.isOk()) {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -352,10 +351,9 @@
unsafeChannel5Ghz.band = WifiBand::BAND_5GHZ;
unsafeChannel5Ghz.channel = 36;
vec.push_back(unsafeChannel5Ghz);
- restrictions = static_cast<IWifiChip::CoexRestriction>(
- static_cast<int32_t>(IWifiChip::CoexRestriction::WIFI_AWARE) |
- static_cast<int32_t>(IWifiChip::CoexRestriction::SOFTAP) |
- static_cast<int32_t>(IWifiChip::CoexRestriction::WIFI_DIRECT));
+ restrictions = static_cast<int32_t>(IWifiChip::CoexRestriction::WIFI_AWARE) |
+ static_cast<int32_t>(IWifiChip::CoexRestriction::SOFTAP) |
+ static_cast<int32_t>(IWifiChip::CoexRestriction::WIFI_DIRECT);
status = wifi_chip_->setCoexUnsafeChannels(vec, restrictions);
if (!status.isOk()) {
@@ -368,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));
@@ -385,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));
@@ -399,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 fe32be5..07817cc 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) {
- IWifiStaIface::StaIfaceCapabilityMask caps = {};
- EXPECT_TRUE(wifi_sta_iface_->getCapabilities(&caps).isOk());
- return static_cast<uint32_t>(caps) & static_cast<uint32_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,19 +83,19 @@
}
/*
- * GetCapabilities
+ * GetFeatureSet
*/
-TEST_P(WifiStaIfaceAidlTest, GetCapabilities) {
- IWifiStaIface::StaIfaceCapabilityMask caps = {};
- EXPECT_TRUE(wifi_sta_iface_->getCapabilities(&caps).isOk());
- EXPECT_NE(static_cast<int32_t>(caps), 0);
+TEST_P(WifiStaIfaceAidlTest, GetFeatureSet) {
+ int32_t features = 0;
+ EXPECT_TRUE(wifi_sta_iface_->getFeatureSet(&features).isOk());
+ EXPECT_NE(features, 0);
}
/*
* GetApfPacketFilterCapabilities
*/
TEST_P(WifiStaIfaceAidlTest, GetApfPacketFilterCapabilities) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::APF)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::APF)) {
GTEST_SKIP() << "APF packet filter capabilities are not supported.";
}
StaApfPacketFilterCapabilities apf_caps = {};
@@ -106,7 +106,7 @@
* 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 +114,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 +166,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 +187,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 +203,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 +235,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/hostapd/aidl/lint-baseline.xml b/wifi/hostapd/aidl/lint-baseline.xml
new file mode 100644
index 0000000..657622e
--- /dev/null
+++ b/wifi/hostapd/aidl/lint-baseline.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.0.0-dev" type="baseline" dependencies="true" variant="all" version="8.0.0-dev">
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/hostapd/aidl/android.hardware.wifi.hostapd-V1-java-source/gen/android/hardware/wifi/hostapd/IHostapd.java"
+ line="55"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/hostapd/aidl/android.hardware.wifi.hostapd-V1-java-source/gen/android/hardware/wifi/hostapd/IHostapdCallback.java"
+ line="46"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/hostapd/aidl/android.hardware.wifi.hostapd-V2-java-source/gen/android/hardware/wifi/hostapd/IHostapd.java"
+ line="117"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/hostapd/aidl/android.hardware.wifi.hostapd-V2-java-source/gen/android/hardware/wifi/hostapd/IHostapdCallback.java"
+ line="62"
+ column="12"/>
+ </issue>
+
+</issues>
\ No newline at end of file
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/ISupplicantStaIface.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantStaIface.aidl
index f617975..1616b26 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantStaIface.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantStaIface.aidl
@@ -98,6 +98,5 @@
android.hardware.wifi.supplicant.SignalPollResult[] getSignalPollResults();
android.hardware.wifi.supplicant.QosPolicyScsRequestStatus[] addQosPolicyRequestForScs(in android.hardware.wifi.supplicant.QosPolicyScsData[] qosPolicyData);
android.hardware.wifi.supplicant.QosPolicyScsRequestStatus[] removeQosPolicyForScs(in byte[] scsPolicyIds);
- android.hardware.wifi.supplicant.QosPolicyScsRequestStatus[] removeAllQosPoliciesForScs();
const int MAX_POLICIES_PER_QOS_SCS_REQUEST = 16;
}
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/ISupplicantStaIface.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantStaIface.aidl
index e006048..06ab8fb 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantStaIface.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantStaIface.aidl
@@ -850,20 +850,4 @@
* being processed. Supplicant will only handle one request at a time.
*/
QosPolicyScsRequestStatus[] removeQosPolicyForScs(in byte[] scsPolicyIds);
-
- /**
- * Request the removal of all QoS policies for SCS configured by the STA.
- *
- * @return QosPolicyScsRequestStatus[] synchronously corresponding to all
- * the scs policies.
- * @throws ServiceSpecificException with one of the following values:
- * |SupplicantStatusCode.FAILURE_UNKNOWN| if there are no policies to remove.
- *
- * |SupplicantStatusCode.FAILURE_UNSUPPORTED| if the AP does not support
- * the feature.
- *
- * |SupplicantStatusCode.FAILURE_ONGOING_REQUEST| if a request is currently
- * being processed. Supplicant will only handle one request at a time.
- */
- QosPolicyScsRequestStatus[] removeAllQosPoliciesForScs();
}
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.
diff --git a/wifi/supplicant/aidl/lint-baseline.xml b/wifi/supplicant/aidl/lint-baseline.xml
new file mode 100644
index 0000000..0631223
--- /dev/null
+++ b/wifi/supplicant/aidl/lint-baseline.xml
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.0.0-dev" type="baseline" dependencies="true" variant="all" version="8.0.0-dev">
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicant.java"
+ line="84"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantCallback.java"
+ line="43"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantP2pIface.java"
+ line="237"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.java"
+ line="91"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantP2pNetwork.java"
+ line="76"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaIface.java"
+ line="235"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaIfaceCallback.java"
+ line="124"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaNetwork.java"
+ line="354"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V1-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaNetworkCallback.java"
+ line="52"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/INonStandardCertCallback.java"
+ line="67"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicant.java"
+ line="200"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantCallback.java"
+ line="60"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantP2pIface.java"
+ line="928"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.java"
+ line="265"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantP2pNetwork.java"
+ line="164"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaIface.java"
+ line="939"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaIfaceCallback.java"
+ line="390"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaNetwork.java"
+ line="1239"
+ column="12"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/.intermediates/hardware/interfaces/wifi/supplicant/aidl/android.hardware.wifi.supplicant-V2-java-source/gen/android/hardware/wifi/supplicant/ISupplicantStaNetworkCallback.java"
+ line="97"
+ column="12"/>
+ </issue>
+
+</issues>
\ No newline at end of file