Merge "VTS driver module for vehicle hal"
diff --git a/audio/2.0/IDevicesFactory.hal b/audio/2.0/IDevicesFactory.hal
index a4e6956..f1dc7d3 100644
--- a/audio/2.0/IDevicesFactory.hal
+++ b/audio/2.0/IDevicesFactory.hal
@@ -22,7 +22,7 @@
interface IDevicesFactory {
typedef android.hardware.audio@2.0::Result Result;
- enum Device {
+ enum Device : int32_t {
PRIMARY,
A2DP,
USB,
diff --git a/audio/2.0/IPrimaryDevice.hal b/audio/2.0/IPrimaryDevice.hal
index 6beddfe..f1dd56e 100644
--- a/audio/2.0/IPrimaryDevice.hal
+++ b/audio/2.0/IPrimaryDevice.hal
@@ -76,7 +76,7 @@
*/
setBtScoWidebandEnabled(bool enabled) generates (Result retval);
- enum TtyMode {
+ enum TtyMode : int32_t {
OFF,
VCO,
HCO,
diff --git a/audio/2.0/default/Device.h b/audio/2.0/default/Device.h
index 3fd67e3..49d6b2c 100644
--- a/audio/2.0/default/Device.h
+++ b/audio/2.0/default/Device.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_V2_0_Device_H_
-#define HIDL_GENERATED_android_hardware_audio_V2_0_Device_H_
+#ifndef ANDROID_HARDWARE_AUDIO_V2_0_DEVICE_H
+#define ANDROID_HARDWARE_AUDIO_V2_0_DEVICE_H
#include <memory>
@@ -144,4 +144,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_V2_0_Device_H_
+#endif // ANDROID_HARDWARE_AUDIO_V2_0_DEVICE_H
diff --git a/audio/2.0/default/DevicesFactory.h b/audio/2.0/default/DevicesFactory.h
index 0ea9859..b046f9f 100644
--- a/audio/2.0/default/DevicesFactory.h
+++ b/audio/2.0/default/DevicesFactory.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_V2_0_DevicesFactory_H_
-#define HIDL_GENERATED_android_hardware_audio_V2_0_DevicesFactory_H_
+#ifndef ANDROID_HARDWARE_AUDIO_V2_0_DEVICESFACTORY_H
+#define ANDROID_HARDWARE_AUDIO_V2_0_DEVICESFACTORY_H
#include <hardware/audio.h>
@@ -56,4 +56,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_V2_0_DevicesFactory_H_
+#endif // ANDROID_HARDWARE_AUDIO_V2_0_DEVICESFACTORY_H
diff --git a/audio/2.0/default/PrimaryDevice.h b/audio/2.0/default/PrimaryDevice.h
index 968c208..8177b68 100644
--- a/audio/2.0/default/PrimaryDevice.h
+++ b/audio/2.0/default/PrimaryDevice.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_V2_0_PrimaryDevice_H_
-#define HIDL_GENERATED_android_hardware_audio_V2_0_PrimaryDevice_H_
+#ifndef ANDROID_HARDWARE_AUDIO_V2_0_PRIMARYDEVICE_H
+#define ANDROID_HARDWARE_AUDIO_V2_0_PRIMARYDEVICE_H
#include <android/hardware/audio/2.0/IPrimaryDevice.h>
#include <hidl/Status.h>
@@ -114,4 +114,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_V2_0_PrimaryDevice_H_
+#endif // ANDROID_HARDWARE_AUDIO_V2_0_PRIMARYDEVICE_H
diff --git a/audio/2.0/default/Stream.h b/audio/2.0/default/Stream.h
index 3893af4..2e641d6 100644
--- a/audio/2.0/default/Stream.h
+++ b/audio/2.0/default/Stream.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_V2_0_Stream_H_
-#define HIDL_GENERATED_android_hardware_audio_V2_0_Stream_H_
+#ifndef ANDROID_HARDWARE_AUDIO_V2_0_STREAM_H
+#define ANDROID_HARDWARE_AUDIO_V2_0_STREAM_H
#include <android/hardware/audio/2.0/IStream.h>
#include <hidl/Status.h>
@@ -91,4 +91,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_V2_0_Stream_H_
+#endif // ANDROID_HARDWARE_AUDIO_V2_0_STREAM_H
diff --git a/audio/2.0/default/StreamIn.h b/audio/2.0/default/StreamIn.h
index c2a7ea2..f7c17b7 100644
--- a/audio/2.0/default/StreamIn.h
+++ b/audio/2.0/default/StreamIn.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_V2_0_StreamIn_H_
-#define HIDL_GENERATED_android_hardware_audio_V2_0_StreamIn_H_
+#ifndef ANDROID_HARDWARE_AUDIO_V2_0_STREAMIN_H
+#define ANDROID_HARDWARE_AUDIO_V2_0_STREAMIN_H
#include <android/hardware/audio/2.0/IStreamIn.h>
#include <hidl/Status.h>
@@ -95,4 +95,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_V2_0_StreamIn_H_
+#endif // ANDROID_HARDWARE_AUDIO_V2_0_STREAMIN_H
diff --git a/audio/2.0/default/StreamOut.h b/audio/2.0/default/StreamOut.h
index ca33b2d..d51fc66 100644
--- a/audio/2.0/default/StreamOut.h
+++ b/audio/2.0/default/StreamOut.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_V2_0_StreamOut_H_
-#define HIDL_GENERATED_android_hardware_audio_V2_0_StreamOut_H_
+#ifndef ANDROID_HARDWARE_AUDIO_V2_0_STREAMOUT_H
+#define ANDROID_HARDWARE_AUDIO_V2_0_STREAMOUT_H
#include <android/hardware/audio/2.0/IStreamOut.h>
#include <hidl/Status.h>
@@ -110,4 +110,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_V2_0_StreamOut_H_
+#endif // ANDROID_HARDWARE_AUDIO_V2_0_STREAMOUT_H
diff --git a/audio/2.0/types.hal b/audio/2.0/types.hal
index 9a5e4f1..7002f38 100644
--- a/audio/2.0/types.hal
+++ b/audio/2.0/types.hal
@@ -18,7 +18,7 @@
import android.hardware.audio.common@2.0;
-enum Result {
+enum Result : int32_t {
OK,
NOT_INITIALIZED,
INVALID_ARGUMENTS,
@@ -27,7 +27,7 @@
};
@export(name="audio_drain_type_t", value_prefix="AUDIO_DRAIN_")
-enum AudioDrain {
+enum AudioDrain : int32_t {
/* drain() returns when all data has been played. */
ALL,
/* drain() returns a short time before all data from the current track has
diff --git a/audio/common/2.0/types.hal b/audio/common/2.0/types.hal
index 75fdb52..4e969a7 100644
--- a/audio/common/2.0/types.hal
+++ b/audio/common/2.0/types.hal
@@ -56,7 +56,7 @@
* Each port has a unique ID or handle allocated by policy manager.
*/
@export(name="")
-enum AudioHandleConsts {
+enum AudioHandleConsts : int32_t {
AUDIO_IO_HANDLE_NONE = 0,
AUDIO_MODULE_HANDLE_NONE = 0,
AUDIO_PORT_HANDLE_NONE = 0,
@@ -114,7 +114,7 @@
};
@export(name="audio_source_t", value_prefix="AUDIO_SOURCE_")
-enum AudioSource {
+enum AudioSource : int32_t {
// These values must kept in sync with
// frameworks/base/media/java/android/media/MediaRecorder.java,
// frameworks/av/services/audiopolicy/AudioPolicyService.cpp,
@@ -269,7 +269,7 @@
* assumptions.
*/
@export(name="")
-enum FixedChannelCount {
+enum FixedChannelCount : int32_t {
FCC_2 = 2, // This is typically due to legacy implementation of stereo I/O
FCC_8 = 8 // This is typically due to audio mixer and resampler limitations
};
@@ -425,7 +425,7 @@
* to this convention will be noted at the appropriate API.
*/
@export(name="", value_prefix="AUDIO_INTERLEAVE_")
-enum AudioInterleave {
+enum AudioInterleave : int32_t {
LEFT = 0,
RIGHT = 1,
};
@@ -435,7 +435,7 @@
* routing.
*/
@export(name="audio_mode_t", value_prefix="AUDIO_MODE_")
-enum AudioMode {
+enum AudioMode : int32_t {
INVALID = -2,
CURRENT = -1,
NORMAL = 0,
@@ -597,7 +597,7 @@
* (when getOuput() is called) to an available output stream.
*/
@export(name="audio_output_flags_t", value_prefix="AUDIO_OUTPUT_FLAG_")
-enum AudioOutputFlag {
+enum AudioOutputFlag : int32_t {
NONE = 0x0, // no attributes
DIRECT = 0x1, // this output directly connects a track
// to one output stream: no software mixer
@@ -627,7 +627,7 @@
* attributes corresponding to the specified flags.
*/
@export(name="audio_input_flags_t", value_prefix="AUDIO_INPUT_FLAG_")
-enum AudioInputFlag {
+enum AudioInputFlag : int32_t {
NONE = 0x0, // no attributes
FAST = 0x1, // prefer an input that supports "fast tracks"
HW_HOTWORD = 0x2, // prefer an input that captures from hw hotword source
@@ -728,7 +728,7 @@
/* Audio port role: either source or sink */
@export(name="audio_port_role_t", value_prefix="AUDIO_PORT_ROLE_")
-enum AudioPortRole {
+enum AudioPortRole : int32_t {
NONE,
SOURCE,
SINK,
@@ -739,7 +739,7 @@
* PlaybackThread output) or a physical device (e.g OUT_SPEAKER)
*/
@export(name="audio_port_type_t", value_prefix="AUDIO_PORT_TYPE_")
-enum AudioPortType {
+enum AudioPortType : int32_t {
NONE,
DEVICE,
MIX,
@@ -816,7 +816,7 @@
* Latency class of the audio mix.
*/
@export(name="audio_mix_latency_class_t", value_prefix="AUDIO_LATENCY_")
-enum AudioMixLatencyClass {
+enum AudioMixLatencyClass : int32_t {
LOW,
NORMAL
} ;
diff --git a/audio/effect/2.0/IDownmixEffect.hal b/audio/effect/2.0/IDownmixEffect.hal
index 817e14c..06409a3 100644
--- a/audio/effect/2.0/IDownmixEffect.hal
+++ b/audio/effect/2.0/IDownmixEffect.hal
@@ -20,7 +20,7 @@
import IEffect;
interface IDownmixEffect extends IEffect {
- enum Type {
+ enum Type : int32_t {
STRIP, // throw away the extra channels
FOLD // mix the extra channels with FL/FR
};
diff --git a/audio/effect/2.0/INoiseSuppressionEffect.hal b/audio/effect/2.0/INoiseSuppressionEffect.hal
index 58e439f..ae2bfb5 100644
--- a/audio/effect/2.0/INoiseSuppressionEffect.hal
+++ b/audio/effect/2.0/INoiseSuppressionEffect.hal
@@ -20,7 +20,7 @@
import IEffect;
interface INoiseSuppressionEffect extends IEffect {
- enum Level {
+ enum Level : int32_t {
LOW,
MEDIUM,
HIGH
@@ -36,7 +36,7 @@
*/
getSuppressionLevel() generates (Result retval, Level level);
- enum Type {
+ enum Type : int32_t {
SINGLE_CHANNEL,
MULTI_CHANNEL
};
diff --git a/audio/effect/2.0/IPresetReverbEffect.hal b/audio/effect/2.0/IPresetReverbEffect.hal
index 58dfd40..2237bc4 100644
--- a/audio/effect/2.0/IPresetReverbEffect.hal
+++ b/audio/effect/2.0/IPresetReverbEffect.hal
@@ -20,7 +20,7 @@
import IEffect;
interface IPresetReverbEffect extends IEffect {
- enum Preset {
+ enum Preset : int32_t {
NONE, // no reverb or reflections
SMALLROOM, // a small room less than five meters in length
MEDIUMROOM, // a medium room with a length of ten meters or less
diff --git a/audio/effect/2.0/IVisualizerEffect.hal b/audio/effect/2.0/IVisualizerEffect.hal
index 70dabf9..79dc9ee 100644
--- a/audio/effect/2.0/IVisualizerEffect.hal
+++ b/audio/effect/2.0/IVisualizerEffect.hal
@@ -20,7 +20,7 @@
import IEffect;
interface IVisualizerEffect extends IEffect {
- enum CaptureSizeRange {
+ enum CaptureSizeRange : int32_t {
MAX = 1024, // maximum capture size in samples
MIN = 128 // minimum capture size in samples
};
@@ -35,7 +35,7 @@
*/
getCaptureSize() generates (Result retval, uint16_t captureSize);
- enum ScalingMode {
+ enum ScalingMode : int32_t {
// Keep in sync with SCALING_MODE_... in
// frameworks/base/media/java/android/media/audiofx/Visualizer.java
NORMALIZED = 0,
@@ -62,7 +62,7 @@
*/
getLatency() generates (Result retval, uint32_t latencyMs);
- enum MeasurementMode {
+ enum MeasurementMode : int32_t {
// Keep in sync with MEASUREMENT_MODE_... in
// frameworks/base/media/java/android/media/audiofx/Visualizer.java
NONE = 0x0,
diff --git a/audio/effect/2.0/default/AcousticEchoCancelerEffect.h b/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
index cebc2d4..71fcc97 100644
--- a/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
+++ b/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_AcousticEchoCancelerEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_AcousticEchoCancelerEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
#include <android/hardware/audio/effect/2.0/IAcousticEchoCancelerEffect.h>
#include <hidl/Status.h>
@@ -115,4 +115,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_AcousticEchoCancelerEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
diff --git a/audio/effect/2.0/default/AutomaticGainControlEffect.h b/audio/effect/2.0/default/AutomaticGainControlEffect.h
index f4b228c..1696d3c 100644
--- a/audio/effect/2.0/default/AutomaticGainControlEffect.h
+++ b/audio/effect/2.0/default/AutomaticGainControlEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_AutomaticGainControlEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_AutomaticGainControlEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
#include <system/audio_effects/effect_agc.h>
@@ -131,4 +131,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_AutomaticGainControlEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
diff --git a/audio/effect/2.0/default/BassBoostEffect.h b/audio/effect/2.0/default/BassBoostEffect.h
index 23377e1..6636717 100644
--- a/audio/effect/2.0/default/BassBoostEffect.h
+++ b/audio/effect/2.0/default/BassBoostEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_BassBoostEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_BassBoostEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
#include <android/hardware/audio/effect/2.0/IBassBoostEffect.h>
#include <hidl/Status.h>
@@ -116,4 +116,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_BassBoostEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
diff --git a/audio/effect/2.0/default/DownmixEffect.h b/audio/effect/2.0/default/DownmixEffect.h
index 5ed4ffd..c7e1b9b 100644
--- a/audio/effect/2.0/default/DownmixEffect.h
+++ b/audio/effect/2.0/default/DownmixEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_DownmixEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_DownmixEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
#include <android/hardware/audio/effect/2.0/IDownmixEffect.h>
#include <hidl/Status.h>
@@ -115,4 +115,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_DownmixEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
diff --git a/audio/effect/2.0/default/Effect.h b/audio/effect/2.0/default/Effect.h
index e27a7e4..82eb1f2 100644
--- a/audio/effect/2.0/default/Effect.h
+++ b/audio/effect/2.0/default/Effect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_Effect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_Effect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
#include <vector>
@@ -256,4 +256,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_Effect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
diff --git a/audio/effect/2.0/default/EffectsFactory.h b/audio/effect/2.0/default/EffectsFactory.h
index d934c93..829a534 100644
--- a/audio/effect/2.0/default/EffectsFactory.h
+++ b/audio/effect/2.0/default/EffectsFactory.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_EffectsFactory_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_EffectsFactory_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
#include <system/audio_effect.h>
@@ -63,4 +63,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_EffectsFactory_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
diff --git a/audio/effect/2.0/default/EnvironmentalReverbEffect.h b/audio/effect/2.0/default/EnvironmentalReverbEffect.h
index c97c51c..edb5747 100644
--- a/audio/effect/2.0/default/EnvironmentalReverbEffect.h
+++ b/audio/effect/2.0/default/EnvironmentalReverbEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_EnvironmentalReverbEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_EnvironmentalReverbEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
#include <system/audio_effects/effect_environmentalreverb.h>
@@ -157,4 +157,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_EnvironmentalReverbEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
diff --git a/audio/effect/2.0/default/EqualizerEffect.h b/audio/effect/2.0/default/EqualizerEffect.h
index 5665e9c..ba99e2b 100644
--- a/audio/effect/2.0/default/EqualizerEffect.h
+++ b/audio/effect/2.0/default/EqualizerEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_EqualizerEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_EqualizerEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
#include <vector>
@@ -147,4 +147,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_EqualizerEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
diff --git a/audio/effect/2.0/default/LoudnessEnhancerEffect.h b/audio/effect/2.0/default/LoudnessEnhancerEffect.h
index e68b038..8ca6e94 100644
--- a/audio/effect/2.0/default/LoudnessEnhancerEffect.h
+++ b/audio/effect/2.0/default/LoudnessEnhancerEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_LoudnessEnhancerEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_LoudnessEnhancerEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
#include <android/hardware/audio/effect/2.0/ILoudnessEnhancerEffect.h>
#include <hidl/Status.h>
@@ -125,4 +125,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_LoudnessEnhancerEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
diff --git a/audio/effect/2.0/default/NoiseSuppressionEffect.h b/audio/effect/2.0/default/NoiseSuppressionEffect.h
index 83e513e..b73727e 100644
--- a/audio/effect/2.0/default/NoiseSuppressionEffect.h
+++ b/audio/effect/2.0/default/NoiseSuppressionEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_NoiseSuppressionEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_NoiseSuppressionEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
#include <system/audio_effects/effect_ns.h>
@@ -139,4 +139,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_NoiseSuppressionEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
diff --git a/audio/effect/2.0/default/PresetReverbEffect.h b/audio/effect/2.0/default/PresetReverbEffect.h
index 3d98102..4d39569 100644
--- a/audio/effect/2.0/default/PresetReverbEffect.h
+++ b/audio/effect/2.0/default/PresetReverbEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_PresetReverbEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_PresetReverbEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
#include <android/hardware/audio/effect/2.0/IPresetReverbEffect.h>
#include <hidl/Status.h>
@@ -125,4 +125,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_PresetReverbEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
diff --git a/audio/effect/2.0/default/VirtualizerEffect.h b/audio/effect/2.0/default/VirtualizerEffect.h
index 2731c4e..ba89a61 100644
--- a/audio/effect/2.0/default/VirtualizerEffect.h
+++ b/audio/effect/2.0/default/VirtualizerEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_VirtualizerEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_VirtualizerEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
#include <android/hardware/audio/effect/2.0/IVirtualizerEffect.h>
#include <hidl/Status.h>
@@ -136,4 +136,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_VirtualizerEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
diff --git a/audio/effect/2.0/default/VisualizerEffect.h b/audio/effect/2.0/default/VisualizerEffect.h
index 505b16f..ae0b05c 100644
--- a/audio/effect/2.0/default/VisualizerEffect.h
+++ b/audio/effect/2.0/default/VisualizerEffect.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_VisualizerEffect_H_
-#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_VisualizerEffect_H_
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
#include <android/hardware/audio/effect/2.0/IVisualizerEffect.h>
#include <hidl/Status.h>
@@ -135,4 +135,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_VisualizerEffect_H_
+#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
diff --git a/audio/effect/2.0/types.hal b/audio/effect/2.0/types.hal
index 35015b2..ad7f4ce 100644
--- a/audio/effect/2.0/types.hal
+++ b/audio/effect/2.0/types.hal
@@ -18,7 +18,7 @@
import android.hardware.audio.common@2.0;
-enum Result {
+enum Result : int32_t {
OK,
NOT_INITIALIZED,
INVALID_ARGUMENTS,
@@ -110,7 +110,7 @@
* +----------------+--------+--------------------------------------------------
*/
@export(name="", value_prefix="EFFECT_FLAG_")
-enum EffectFlags {
+enum EffectFlags : int32_t {
// Insert mode
TYPE_SHIFT = 0,
TYPE_SIZE = 3,
@@ -229,7 +229,7 @@
};
@export(name="effect_buffer_access_e", value_prefix="EFFECT_BUFFER_")
-enum EffectBufferAccess {
+enum EffectBufferAccess : int32_t {
ACCESS_WRITE,
ACCESS_READ,
ACCESS_ACCUMULATE
@@ -239,7 +239,7 @@
* Determines what fields of EffectBufferConfig need to be considered.
*/
@export(name="", value_prefix="EFFECT_CONFIG_")
-enum EffectConfigParameters {
+enum EffectConfigParameters : int32_t {
BUFFER = 0x0001, // buffer field
SMP_RATE = 0x0002, // samplingRate
CHANNELS = 0x0004, // channels
@@ -267,7 +267,7 @@
};
@export(name="effect_feature_e", value_prefix="EFFECT_FEATURE_")
-enum EffectFeature {
+enum EffectFeature : int32_t {
AUX_CHANNELS, // supports auxiliary channels
// (e.g. dual mic noise suppressor)
CNT
diff --git a/boot/1.0/default/BootControl.cpp b/boot/1.0/default/BootControl.cpp
index 4c34168..56d7b33 100644
--- a/boot/1.0/default/BootControl.cpp
+++ b/boot/1.0/default/BootControl.cpp
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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 "android.hardware.boot@1.0-impl"
#include <utils/Log.h>
diff --git a/boot/1.0/default/BootControl.h b/boot/1.0/default/BootControl.h
index be8a814..3d668dc 100644
--- a/boot/1.0/default/BootControl.h
+++ b/boot/1.0/default/BootControl.h
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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.
+ */
#ifndef ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H
#define ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H
diff --git a/boot/1.0/default/service.cpp b/boot/1.0/default/service.cpp
index a594db6..0dc56bf 100644
--- a/boot/1.0/default/service.cpp
+++ b/boot/1.0/default/service.cpp
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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 "android.hardware.boot@1.0-service"
#include <android/hardware/boot/1.0/IBootControl.h>
diff --git a/broadcastradio/1.0/default/BroadcastRadio.h b/broadcastradio/1.0/default/BroadcastRadio.h
index dbd6e07..6764d82 100644
--- a/broadcastradio/1.0/default/BroadcastRadio.h
+++ b/broadcastradio/1.0/default/BroadcastRadio.h
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_broadcastradio_V1_0_BroadcastRadio_H_
-#define HIDL_GENERATED_android_hardware_broadcastradio_V1_0_BroadcastRadio_H_
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_0_BROADCASTRADIO_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_0_BROADCASTRADIO_H
#include <android/hardware/broadcastradio/1.0/IBroadcastRadio.h>
#include <hidl/Status.h>
@@ -68,4 +68,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_broadcastradio_V1_0_BroadcastRadio_H_
+#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_0_BROADCASTRADIO_H
diff --git a/broadcastradio/1.0/default/BroadcastRadioFactory.h b/broadcastradio/1.0/default/BroadcastRadioFactory.h
index 9b2ca17..97f7f55 100644
--- a/broadcastradio/1.0/default/BroadcastRadioFactory.h
+++ b/broadcastradio/1.0/default/BroadcastRadioFactory.h
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_broadcastradio_V1_0_BroadcastRadioFactory_H_
-#define HIDL_GENERATED_android_hardware_broadcastradio_V1_0_BroadcastRadioFactory_H_
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_0_BROADCASTRADIOFACTORY_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_0_BROADCASTRADIOFACTORY_H
#include <android/hardware/broadcastradio/1.0/IBroadcastRadioFactory.h>
#include <hidl/Status.h>
@@ -40,4 +40,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_broadcastradio_V1_0_BroadcastRadioFactory_H_
+#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_0_BROADCASTRADIOFACTORY_H
diff --git a/broadcastradio/1.0/default/Tuner.h b/broadcastradio/1.0/default/Tuner.h
index 94e216e..a621d97 100644
--- a/broadcastradio/1.0/default/Tuner.h
+++ b/broadcastradio/1.0/default/Tuner.h
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_broadcastradio_V1_0_Tuner_H_
-#define HIDL_GENERATED_android_hardware_broadcastradio_V1_0_Tuner_H_
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_0_TUNER_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_0_TUNER_H
#include <android/hardware/broadcastradio/1.0/ITuner.h>
#include <android/hardware/broadcastradio/1.0/ITunerCallback.h>
@@ -64,4 +64,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_broadcastradio_V1_0_Tuner_H_
+#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_0_TUNER_H
diff --git a/broadcastradio/1.0/types.hal b/broadcastradio/1.0/types.hal
index d04359c..d8b2da3 100644
--- a/broadcastradio/1.0/types.hal
+++ b/broadcastradio/1.0/types.hal
@@ -16,7 +16,7 @@
package android.hardware.broadcastradio@1.0;
-enum Result {
+enum Result : int32_t {
OK,
NOT_INITIALIZED,
INVALID_ARGUMENTS,
@@ -139,7 +139,7 @@
vec<BandConfig> bands; /* band descriptors */
};
-enum MetadataType {
+enum MetadataType : int32_t {
INVALID = -1,
/* Signed 32 bit integer */
INT = 0,
@@ -152,7 +152,7 @@
CLOCK = 3,
};
-enum MetadataKey {
+enum MetadataKey : int32_t {
INVALID = -1,
/* RDS PI - string */
RDS_PI = 0,
diff --git a/contexthub/1.0/types.hal b/contexthub/1.0/types.hal
index 7d5a1ac..b9f014b 100644
--- a/contexthub/1.0/types.hal
+++ b/contexthub/1.0/types.hal
@@ -138,7 +138,7 @@
RESTARTED = 1, // Hub restarted unexpectedly
};
-enum TransactionResult {
+enum TransactionResult : int32_t {
SUCCESS, // successful completion of transaction
FAILURE, // failed transaction
};
diff --git a/dumpstate/1.0/default/DumpstateDevice.h b/dumpstate/1.0/default/DumpstateDevice.h
index 6f860c0..f216304 100644
--- a/dumpstate/1.0/default/DumpstateDevice.h
+++ b/dumpstate/1.0/default/DumpstateDevice.h
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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.
+ */
#ifndef ANDROID_HARDWARE_DUMPSTATE_V1_0_DUMPSTATEDEVICE_H
#define ANDROID_HARDWARE_DUMPSTATE_V1_0_DUMPSTATEDEVICE_H
diff --git a/example/extension/light/2.0/default/Light.cpp b/example/extension/light/2.0/default/Light.cpp
index d738a6d..2e56319 100644
--- a/example/extension/light/2.0/default/Light.cpp
+++ b/example/extension/light/2.0/default/Light.cpp
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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 "Light.h"
namespace android {
diff --git a/example/extension/light/2.0/default/Light.h b/example/extension/light/2.0/default/Light.h
index e09ec92..e3b60df 100644
--- a/example/extension/light/2.0/default/Light.h
+++ b/example/extension/light/2.0/default/Light.h
@@ -1,5 +1,20 @@
-#ifndef HIDL_GENERATED_android_hardware_example_extension_light_V2_0_Light_H_
-#define HIDL_GENERATED_android_hardware_example_extension_light_V2_0_Light_H_
+/*
+ * Copyright (C) 2016 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.
+ */
+#ifndef ANDROID_HARDWARE_EXAMPLE_EXTENSION_LIGHT_V2_0_LIGHT_H
+#define ANDROID_HARDWARE_EXAMPLE_EXTENSION_LIGHT_V2_0_LIGHT_H
#include <android/hardware/example/extension/light/2.0/IExtLight.h>
#include <hidl/Status.h>
@@ -43,4 +58,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_example_extension_light_V2_0_Light_H_
+#endif // ANDROID_HARDWARE_EXAMPLE_EXTENSION_LIGHT_V2_0_LIGHT_H
diff --git a/example/extension/light/2.0/default/service.cpp b/example/extension/light/2.0/default/service.cpp
index d21afa6..ae00506 100644
--- a/example/extension/light/2.0/default/service.cpp
+++ b/example/extension/light/2.0/default/service.cpp
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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 "android.hardware.light@2.0-service"
#include <utils/Log.h>
diff --git a/gatekeeper/1.0/IGatekeeper.hal b/gatekeeper/1.0/IGatekeeper.hal
index 999a311..c193477 100644
--- a/gatekeeper/1.0/IGatekeeper.hal
+++ b/gatekeeper/1.0/IGatekeeper.hal
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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.gatekeeper@1.0;
interface IGatekeeper {
diff --git a/gatekeeper/1.0/default/Gatekeeper.cpp b/gatekeeper/1.0/default/Gatekeeper.cpp
index 8fcd8ca..35b8c02 100644
--- a/gatekeeper/1.0/default/Gatekeeper.cpp
+++ b/gatekeeper/1.0/default/Gatekeeper.cpp
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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 "android.hardware.gatekeeper@1.0-service"
#include <utils/Log.h>
diff --git a/gatekeeper/1.0/default/Gatekeeper.h b/gatekeeper/1.0/default/Gatekeeper.h
index a2188d4..4cc01f6 100644
--- a/gatekeeper/1.0/default/Gatekeeper.h
+++ b/gatekeeper/1.0/default/Gatekeeper.h
@@ -1,5 +1,20 @@
-#ifndef HIDL_GENERATED_android_hardware_gatekeeper_V1_0_Gatekeeper_H_
-#define HIDL_GENERATED_android_hardware_gatekeeper_V1_0_Gatekeeper_H_
+/*
+ * Copyright (C) 2016 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.
+ */
+#ifndef ANDROID_HARDWARE_GATEKEEPER_V1_0_GATEKEEPER_H
+#define ANDROID_HARDWARE_GATEKEEPER_V1_0_GATEKEEPER_H
#include <android/hardware/gatekeeper/1.0/IGatekeeper.h>
#include <hidl/Status.h>
@@ -54,4 +69,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_gatekeeper_V1_0_Gatekeeper_H_
+#endif // ANDROID_HARDWARE_GATEKEEPER_V1_0_GATEKEEPER_H
diff --git a/gatekeeper/1.0/default/service.cpp b/gatekeeper/1.0/default/service.cpp
index c3fc25c..407cf71 100644
--- a/gatekeeper/1.0/default/service.cpp
+++ b/gatekeeper/1.0/default/service.cpp
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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 "android.hardware.gatekeeper@1.0-service"
#include <android/hardware/gatekeeper/1.0/IGatekeeper.h>
diff --git a/gatekeeper/1.0/types.hal b/gatekeeper/1.0/types.hal
index 9ab1152..8c184ee 100644
--- a/gatekeeper/1.0/types.hal
+++ b/gatekeeper/1.0/types.hal
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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.gatekeeper@1.0;
/**
diff --git a/gnss/1.0/IAGnssRil.hal b/gnss/1.0/IAGnssRil.hal
index fb73498..7363d46 100644
--- a/gnss/1.0/IAGnssRil.hal
+++ b/gnss/1.0/IAGnssRil.hal
@@ -41,7 +41,7 @@
WIMAX = 6,
};
- enum AGnssRefLocationType {
+ enum AGnssRefLocationType : int32_t {
GSM_CELLID = 1,
UMTS_CELLID = 2,
MAC = 3,
diff --git a/health/1.0/default/Health.h b/health/1.0/default/Health.h
index c05751f..ed364c1 100644
--- a/health/1.0/default/Health.h
+++ b/health/1.0/default/Health.h
@@ -1,5 +1,20 @@
-#ifndef HIDL_GENERATED_android_hardware_health_V1_0_Health_H_
-#define HIDL_GENERATED_android_hardware_health_V1_0_Health_H_
+/*
+ * Copyright (C) 2016 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.
+ */
+#ifndef ANDROID_HARDWARE_HEALTH_V1_0_HEALTH_H
+#define ANDROID_HARDWARE_HEALTH_V1_0_HEALTH_H
#include <android/hardware/health/1.0/IHealth.h>
#include <hidl/Status.h>
@@ -39,4 +54,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_health_V1_0_Health_H_
+#endif // ANDROID_HARDWARE_HEALTH_V1_0_HEALTH_H
diff --git a/light/2.0/default/Light.cpp b/light/2.0/default/Light.cpp
index fe94e91..eb1f559 100644
--- a/light/2.0/default/Light.cpp
+++ b/light/2.0/default/Light.cpp
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2016 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 "Light.h"
namespace android {
diff --git a/light/2.0/default/Light.h b/light/2.0/default/Light.h
index b32a09a..8987036 100644
--- a/light/2.0/default/Light.h
+++ b/light/2.0/default/Light.h
@@ -1,5 +1,20 @@
-#ifndef HIDL_GENERATED_android_hardware_light_V2_0_Light_H_
-#define HIDL_GENERATED_android_hardware_light_V2_0_Light_H_
+/*
+ * Copyright (C) 2016 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.
+ */
+#ifndef ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
+#define ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
#include <android/hardware/light/2.0/ILight.h>
#include <hardware/hardware.h>
@@ -43,4 +58,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_light_V2_0_Light_H_
+#endif // ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
diff --git a/media/omx/1.0/IGraphicBufferSource.hal b/media/omx/1.0/IGraphicBufferSource.hal
index bee57ac..a5b5813 100644
--- a/media/omx/1.0/IGraphicBufferSource.hal
+++ b/media/omx/1.0/IGraphicBufferSource.hal
@@ -47,7 +47,7 @@
setStartTimeUs(int64_t startTimeUs)
generates (Status status);
- setColorAspects(uint32_t aspects) // TODO: Maybe break down aspects.
+ setColorAspects(ColorAspects aspects)
generates (Status status);
setTimeOffsetUs(int64_t timeOffsetUs)
diff --git a/media/omx/1.0/types.hal b/media/omx/1.0/types.hal
index c0350de..5918b59 100644
--- a/media/omx/1.0/types.hal
+++ b/media/omx/1.0/types.hal
@@ -112,7 +112,7 @@
/**
* There are four main types of buffers.
*/
- enum Type {
+ enum Type : int32_t {
INVALID = 0,
PRESET,
SHARED_MEM,
@@ -164,7 +164,7 @@
*
* Enumeration of port modes.
*/
-enum PortMode {
+enum PortMode : int32_t {
PRESET_START = 0,
PRESET_BYTE_BUFFER,
PRESET_ANW_BUFFER,
@@ -176,3 +176,71 @@
DYNAMIC_END
};
+/**
+ * Ref: frameworks/native/include/media/hardware/VideoAPI.h
+ *
+ * Framework defined color aspects. These are based mainly on ISO 23001-8 spec. As this standard
+ * continues to evolve, new values may be defined in the future. Use OTHER for these future values
+ * as well as for values not listed here, as those are not supported by the framework.
+ */
+struct ColorAspects {
+ enum Range : uint32_t {
+ UNSPECIFIED, // Unspecified
+ FULL, // Full range
+ LIMITED, // Limited range (if defined), or not full range
+
+ OTHER = 0xff, // Not one of the above values
+ };
+
+ // Color primaries
+ enum Primaries : uint32_t {
+ UNSPECIFIED, // Unspecified
+ BT709_5, // Rec.ITU-R BT.709-5 or equivalent
+ BT470_6M, // Rec.ITU-R BT.470-6 System M or equivalent
+ BT601_6_625, // Rec.ITU-R BT.601-6 625 or equivalent
+ BT601_6_525, // Rec.ITU-R BT.601-6 525 or equivalent
+ GENERIC_FILM, // Generic Film
+ BT2020, // Rec.ITU-R BT.2020 or equivalent
+
+ OTHER = 0xff, // Not one of the above values
+ };
+
+ // Transfer characteristics
+ enum Transfer : uint32_t {
+ UNSPECIFIED, // Unspecified
+ LINEAR, // Linear transfer characteristics
+ SRGB, // sRGB or equivalent
+ SMPTE170M, // SMPTE 170M or equivalent (e.g. BT.601/709/2020)
+ GAMMA22, // Assumed display gamma 2.2
+ GAMMA28, // Assumed display gamma 2.8
+ ST2084, // SMPTE ST 2084 for 10/12/14/16 bit systems
+ HLG, // ARIB STD-B67 hybrid-log-gamma
+
+ // values unlikely to be required by Android follow here
+ SMPTE240M = 0x40, // SMPTE 240M
+ XVYCC, // IEC 61966-2-4
+ BT1361, // Rec.ITU-R BT.1361 extended gamut
+ ST428, // SMPTE ST 428-1
+
+ OTHER = 0xff, // Not one of the above values
+ };
+
+ // YUV <-> RGB conversion
+ enum MatrixCoeffs : uint32_t {
+ UNSPECIFIED, // Unspecified
+ BT709_5, // Rec.ITU-R BT.709-5 or equivalent
+ BT470_6M, // KR=0.30, KB=0.11 or equivalent
+ BT601_6, // Rec.ITU-R BT.601-6 625 or equivalent
+ SMPTE240M, // SMPTE 240M or equivalent
+ BT2020, // Rec.ITU-R BT.2020 non-constant luminance
+ BT2020CONSTANT, // Rec.ITU-R BT.2020 constant luminance
+
+ OTHER = 0xff, // Not one of the above values
+ };
+
+ Range range;
+ Primaries primaries;
+ Transfer transfer;
+ MatrixCoeffs matrixCoeffs;
+};
+
diff --git a/memtrack/1.0/default/Memtrack.h b/memtrack/1.0/default/Memtrack.h
index 86dae72..a3c55e4 100644
--- a/memtrack/1.0/default/Memtrack.h
+++ b/memtrack/1.0/default/Memtrack.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_memtrack_V1_0_Memtrack_H_
-#define HIDL_GENERATED_android_hardware_memtrack_V1_0_Memtrack_H_
+#ifndef ANDROID_HARDWARE_MEMTRACK_V1_0_MEMTRACK_H
+#define ANDROID_HARDWARE_MEMTRACK_V1_0_MEMTRACK_H
#include <android/hardware/memtrack/1.0/IMemtrack.h>
#include <hidl/Status.h>
@@ -54,4 +54,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_memtrack_V1_0_Memtrack_H_
+#endif // ANDROID_HARDWARE_MEMTRACK_V1_0_MEMTRACK_H
diff --git a/nfc/1.0/types.hal b/nfc/1.0/types.hal
index a266178..3384311 100644
--- a/nfc/1.0/types.hal
+++ b/nfc/1.0/types.hal
@@ -16,6 +16,7 @@
package android.hardware.nfc@1.0;
+@export(name="", value_prefix="HAL_NFC_", value_suffix="_EVT")
enum NfcEvent : uint32_t {
OPEN_CPLT = 0,
CLOSE_CPLT = 1,
@@ -26,6 +27,7 @@
ERROR = 6
};
+@export(name="", value_prefix="HAL_NFC_STATUS_")
enum NfcStatus : uint32_t {
OK = 0,
FAILED = 1,
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
index f692011..ee02488 100644
--- a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
@@ -26,6 +26,6 @@
"/>
<option name="test-config-path" value="vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config" />
<option name="binary-test-type" value="gtest" />
- <option name="test-timeout" value="1m" />
+ <option name="test-timeout" value="10m" />
</test>
</configuration>
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/AndroidTest.xml b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/AndroidTest.xml
index 11aa88f..da6cf22 100644
--- a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/AndroidTest.xml
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/AndroidTest.xml
@@ -25,7 +25,7 @@
_64bit::DATA/nativetest64/nfc_hidl_hal_test/nfc_hidl_hal_test,
"/>
<option name="binary-test-type" value="gtest" />
- <option name="test-timeout" value="1m" />
+ <option name="test-timeout" value="10m" />
<option name="enable-profiling" value="true" />
</test>
</configuration>
diff --git a/power/1.0/default/Power.h b/power/1.0/default/Power.h
index a0495be..a43aefb 100644
--- a/power/1.0/default/Power.h
+++ b/power/1.0/default/Power.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_power_V1_0_Power_H_
-#define HIDL_GENERATED_android_hardware_power_V1_0_Power_H_
+#ifndef ANDROID_HARDWARE_POWER_V1_0_POWER_H
+#define ANDROID_HARDWARE_POWER_V1_0_POWER_H
#include <android/hardware/power/1.0/IPower.h>
#include <hidl/Status.h>
@@ -58,4 +58,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_power_V1_0_Power_H_
+#endif // ANDROID_HARDWARE_POWER_V1_0_POWER_H
diff --git a/power/1.0/vts/functional/Android.bp b/power/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..81dc316
--- /dev/null
+++ b/power/1.0/vts/functional/Android.bp
@@ -0,0 +1,41 @@
+//
+// Copyright (C) 2016 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.
+//
+
+cc_test {
+ name: "power_hidl_hal_test",
+ gtest: true,
+ srcs: ["power_hidl_hal_test.cpp"],
+ shared_libs: [
+ "libbase",
+ "liblog",
+ "libcutils",
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libnativehelper",
+ "libutils",
+ "android.hardware.power@1.0",
+ ],
+ static_libs: ["libgtest"],
+ cflags: [
+ "--coverage",
+ "-O0",
+ "-g",
+ ],
+ ldflags: [
+ "--coverage"
+ ]
+}
diff --git a/power/1.0/vts/functional/power_hidl_hal_test.cpp b/power/1.0/vts/functional/power_hidl_hal_test.cpp
new file mode 100644
index 0000000..ac56f1a
--- /dev/null
+++ b/power/1.0/vts/functional/power_hidl_hal_test.cpp
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2016 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 "power_hidl_hal_test"
+#include <android-base/logging.h>
+
+#include <android/hardware/power/1.0/IPower.h>
+
+#include <gtest/gtest.h>
+
+using ::android::hardware::power::V1_0::IPower;
+using ::android::hardware::power::V1_0::Feature;
+using ::android::hardware::power::V1_0::PowerHint;
+using ::android::hardware::power::V1_0::PowerStatePlatformSleepState;
+using ::android::hardware::power::V1_0::Status;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::sp;
+
+class PowerHidlTest : public ::testing::Test {
+ public:
+ virtual void SetUp() override {
+ power = IPower::getService("power");
+ ASSERT_NE(power, nullptr);
+ }
+
+ virtual void TearDown() override {}
+
+ sp<IPower> power;
+};
+
+// Sanity check Power::setInteractive.
+TEST_F(PowerHidlTest, SetInteractive) {
+ Return<void> ret;
+
+ ret = power->setInteractive(true);
+ ASSERT_TRUE(ret.getStatus().isOk());
+
+ ret = power->setInteractive(false);
+ ASSERT_TRUE(ret.getStatus().isOk());
+}
+
+// Sanity check Power::powerHint on good and bad inputs.
+TEST_F(PowerHidlTest, PowerHint) {
+ PowerHint badHint = static_cast<PowerHint>(0xA);
+ auto hints = {PowerHint::VSYNC, PowerHint::INTERACTION,
+ PowerHint::VIDEO_ENCODE, PowerHint::VIDEO_DECODE,
+ PowerHint::LOW_POWER, PowerHint::SUSTAINED_PERFORMANCE,
+ PowerHint::VR_MODE, PowerHint::LAUNCH,
+ PowerHint::DISABLE_TOUCH, badHint};
+ Return<void> ret;
+ for (auto hint : hints) {
+ ret = power->powerHint(hint, 1);
+ ASSERT_TRUE(ret.getStatus().isOk());
+
+ ret = power->powerHint(hint, 0);
+ ASSERT_TRUE(ret.getStatus().isOk());
+ }
+}
+
+// Sanity check Power::setFeature() on good and bad inputs.
+TEST_F(PowerHidlTest, SetFeature) {
+ Return<void> ret;
+ ret = power->setFeature(Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE, true);
+ ASSERT_TRUE(ret.getStatus().isOk());
+ ret = power->setFeature(Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE, false);
+ ASSERT_TRUE(ret.getStatus().isOk());
+
+ Feature badFeature = static_cast<Feature>(0x2);
+ ret = power->setFeature(badFeature, true);
+ ASSERT_TRUE(ret.getStatus().isOk());
+ ret = power->setFeature(badFeature, false);
+ ASSERT_TRUE(ret.getStatus().isOk());
+}
+
+// Sanity check Power::getPlatformLowPowerStats().
+TEST_F(PowerHidlTest, GetPlatformLowPowerStats) {
+ hidl_vec<PowerStatePlatformSleepState> vec;
+ Status s;
+ auto cb = [&vec, &s](hidl_vec<PowerStatePlatformSleepState> states,
+ Status status) {
+ vec = states;
+ s = status;
+ };
+ Return<void> ret = power->getPlatformLowPowerStats(cb);
+ ASSERT_TRUE(ret.getStatus().isOk());
+ ASSERT_TRUE(s == Status::SUCCESS || s == Status::FILESYSTEM_ERROR);
+}
+
+int main(int argc, char **argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ ALOGI("Test result = %d", status);
+ return status;
+}
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/Android.mk b/power/1.0/vts/functional/vts/testcases/hal/power/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/__init__.py b/power/1.0/vts/functional/vts/testcases/hal/power/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/__init__.py
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/Android.mk b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/Android.mk b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/Android.mk
new file mode 100644
index 0000000..c66b6fb
--- /dev/null
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/Android.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalPowerHidlTargetTest
+VTS_CONFIG_SRC_DIR := testcases/hal/power/hidl/target
+include test/vts/tools/build/Android.host_config.mk
+
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/AndroidTest.xml b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..bb80de2
--- /dev/null
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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 for VTS Power HIDL HAL's target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="HalPowerHidlTargetTest"/>
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/power_hidl_hal_test/power_hidl_hal_test,
+ _64bit::DATA/nativetest64/power_hidl_hal_test/power_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="1m" />
+ </test>
+</configuration>
diff --git a/power/Android.bp b/power/Android.bp
index ba90f2c..ed19a37 100644
--- a/power/Android.bp
+++ b/power/Android.bp
@@ -2,4 +2,5 @@
subdirs = [
"1.0",
"1.0/default",
+ "1.0/vts/functional",
]
diff --git a/soundtrigger/2.0/Android.mk b/soundtrigger/2.0/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/Android.mk b/soundtrigger/2.0/vts/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/functional/Android.bp b/soundtrigger/2.0/vts/functional/Android.bp
new file mode 100644
index 0000000..8abdf06
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/Android.bp
@@ -0,0 +1,37 @@
+//
+// Copyright (C) 2016 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.
+//
+
+cc_test {
+ name: "soundtrigger_hidl_hal_test",
+ gtest: true,
+ srcs: ["soundtrigger_hidl_hal_test.cpp"],
+ shared_libs: [
+ "libbase",
+ "liblog",
+ "libcutils",
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libnativehelper",
+ "libutils",
+ "android.hardware.soundtrigger@2.0",
+ ],
+ static_libs: ["libgtest"],
+ cflags: [
+ "-O0",
+ "-g",
+ ],
+}
diff --git a/soundtrigger/2.0/vts/functional/Android.mk b/soundtrigger/2.0/vts/functional/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp b/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp
new file mode 100644
index 0000000..cbd8128
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp
@@ -0,0 +1,233 @@
+/*
+ * Copyright (C) 2016 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 "SoundTriggerHidlHalTest"
+#include <android-base/logging.h>
+#include <cutils/native_handle.h>
+
+#include <android/hardware/audio/common/2.0/types.h>
+#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
+#include <android/hardware/soundtrigger/2.0/types.h>
+
+#include <gtest/gtest.h>
+
+using ::android::hardware::audio::common::V2_0::AudioDevice;
+using ::android::hardware::soundtrigger::V2_0::SoundModelHandle;
+using ::android::hardware::soundtrigger::V2_0::SoundModelType;
+using ::android::hardware::soundtrigger::V2_0::RecognitionMode;
+using ::android::hardware::soundtrigger::V2_0::PhraseRecognitionExtra;
+using ::android::hardware::soundtrigger::V2_0::ISoundTriggerHw;
+using ::android::hardware::soundtrigger::V2_0::ISoundTriggerHwCallback;
+using ::android::hardware::Return;
+using ::android::hardware::Status;
+using ::android::hardware::Void;
+using ::android::sp;
+
+// The main test class for Sound Trigger HIDL HAL.
+class SoundTriggerHidlTest : public ::testing::Test {
+ public:
+ virtual void SetUp() override {
+ mSoundTriggerHal = ISoundTriggerHw::getService("sound_trigger.primary", false);
+ ASSERT_NE(nullptr, mSoundTriggerHal.get());
+ ASSERT_TRUE(mSoundTriggerHal->isRemote());
+ mCallback = new MyCallback();
+ ASSERT_NE(nullptr, mCallback.get());
+ }
+
+ class MyCallback : public ISoundTriggerHwCallback {
+ virtual Return<void> recognitionCallback(
+ const ISoundTriggerHwCallback::RecognitionEvent& event __unused,
+ int32_t cookie __unused) {
+ ALOGI("%s", __FUNCTION__);
+ return Void();
+ }
+
+ virtual Return<void> phraseRecognitionCallback(
+ const ISoundTriggerHwCallback::PhraseRecognitionEvent& event __unused,
+ int32_t cookie __unused) {
+ ALOGI("%s", __FUNCTION__);
+ return Void();
+ }
+
+ virtual Return<void> soundModelCallback(
+ const ISoundTriggerHwCallback::ModelEvent& event __unused,
+ int32_t cookie __unused) {
+ ALOGI("%s", __FUNCTION__);
+ return Void();
+ }
+ };
+
+ virtual void TearDown() override {}
+
+ sp<ISoundTriggerHw> mSoundTriggerHal;
+ sp<MyCallback> mCallback;
+};
+
+// A class for test environment setup (kept since this file is a template).
+class SoundTriggerHidlEnvironment : public ::testing::Environment {
+ public:
+ virtual void SetUp() {}
+ virtual void TearDown() {}
+
+ private:
+};
+
+/**
+ * Test ISoundTriggerHw::getProperties() method
+ *
+ * Verifies that:
+ * - the implementation implements the method
+ * - the method returns 0 (no error)
+ * - the implementation supports at least one sound model and one key phrase
+ * - the implementation supports at least VOICE_TRIGGER recognition mode
+ */
+TEST_F(SoundTriggerHidlTest, GetProperties) {
+ ISoundTriggerHw::Properties halProperties;
+ Return<void> hidlReturn;
+ int ret = -ENODEV;
+
+ hidlReturn = mSoundTriggerHal->getProperties([&](int rc, auto res) {
+ ret = rc;
+ halProperties = res;
+ });
+
+ EXPECT_EQ(Status::EX_NONE, hidlReturn.getStatus().exceptionCode());
+ EXPECT_EQ(0, ret);
+ EXPECT_GT(halProperties.maxSoundModels, 0u);
+ EXPECT_GT(halProperties.maxKeyPhrases, 0u);
+ EXPECT_NE(0u, (halProperties.recognitionModes & (uint32_t)RecognitionMode::VOICE_TRIGGER));
+}
+
+/**
+ * Test ISoundTriggerHw::loadPhraseSoundModel() method
+ *
+ * Verifies that:
+ * - the implementation implements the method
+ * - the implementation returns an error when passed a malformed sound model
+ *
+ * There is no way to verify that implementation actually can load a sound model because each
+ * sound model is vendor specific.
+ */
+TEST_F(SoundTriggerHidlTest, LoadInvalidModelFail) {
+ Return<void> hidlReturn;
+ int ret = -ENODEV;
+ ISoundTriggerHw::PhraseSoundModel model;
+ SoundModelHandle handle;
+
+ model.common.type = SoundModelType::UNKNOWN;
+
+ hidlReturn = mSoundTriggerHal->loadPhraseSoundModel(
+ model,
+ mCallback, 0, [&](int32_t retval, auto res) {
+ ret = retval;
+ handle = res;
+ });
+
+ EXPECT_EQ(Status::EX_NONE, hidlReturn.getStatus().exceptionCode());
+ EXPECT_NE(0, ret);
+}
+
+/**
+ * Test ISoundTriggerHw::unloadSoundModel() method
+ *
+ * Verifies that:
+ * - the implementation implements the method
+ * - the implementation returns an error when called without a valid loaded sound model
+ *
+ */
+TEST_F(SoundTriggerHidlTest, UnloadModelNoModelFail) {
+ Return<int32_t> hidlReturn(0);
+ SoundModelHandle halHandle = 0;
+
+ hidlReturn = mSoundTriggerHal->unloadSoundModel(halHandle);
+
+ EXPECT_EQ(Status::EX_NONE, hidlReturn.getStatus().exceptionCode());
+ EXPECT_NE(0, hidlReturn);
+}
+
+/**
+ * Test ISoundTriggerHw::startRecognition() method
+ *
+ * Verifies that:
+ * - the implementation implements the method
+ * - the implementation returns an error when called without a valid loaded sound model
+ *
+ * There is no way to verify that implementation actually starts recognition because no model can
+ * be loaded.
+ */
+TEST_F(SoundTriggerHidlTest, StartRecognitionNoModelFail) {
+ Return<int32_t> hidlReturn(0);
+ SoundModelHandle handle = 0;
+ PhraseRecognitionExtra phrase;
+ ISoundTriggerHw::RecognitionConfig config;
+
+ config.captureHandle = 0;
+ config.captureDevice = AudioDevice::IN_BUILTIN_MIC;
+ phrase.id = 0;
+ phrase.recognitionModes = (uint32_t)RecognitionMode::VOICE_TRIGGER;
+ phrase.confidenceLevel = 0;
+
+ config.phrases.setToExternal(&phrase, 1);
+
+ hidlReturn = mSoundTriggerHal->startRecognition(handle, config, mCallback, 0);
+
+ EXPECT_EQ(Status::EX_NONE, hidlReturn.getStatus().exceptionCode());
+ EXPECT_NE(0, hidlReturn);
+}
+
+/**
+ * Test ISoundTriggerHw::stopRecognition() method
+ *
+ * Verifies that:
+ * - the implementation implements the method
+ * - the implementation returns an error when called without an active recognition running
+ *
+ */
+TEST_F(SoundTriggerHidlTest, StopRecognitionNoAStartFail) {
+ Return<int32_t> hidlReturn(0);
+ SoundModelHandle handle = 0;
+
+ hidlReturn = mSoundTriggerHal->stopRecognition(handle);
+
+ EXPECT_EQ(Status::EX_NONE, hidlReturn.getStatus().exceptionCode());
+ EXPECT_NE(0, hidlReturn);
+}
+
+/**
+ * Test ISoundTriggerHw::stopAllRecognitions() method
+ *
+ * Verifies that:
+ * - the implementation implements this optional method or indicates it is not support by
+ * returning -ENOSYS
+ */
+TEST_F(SoundTriggerHidlTest, stopAllRecognitions) {
+ Return<int32_t> hidlReturn(0);
+ SoundModelHandle handle = 0;
+
+ hidlReturn = mSoundTriggerHal->stopAllRecognitions();
+
+ EXPECT_EQ(Status::EX_NONE, hidlReturn.getStatus().exceptionCode());
+ EXPECT_TRUE(hidlReturn == 0 || hidlReturn == -ENOSYS);
+}
+
+
+int main(int argc, char** argv) {
+ ::testing::AddGlobalTestEnvironment(new SoundTriggerHidlEnvironment);
+ ::testing::InitGoogleTest(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ ALOGI("Test result = %d", status);
+ return status;
+}
diff --git a/soundtrigger/2.0/vts/functional/vts/Android.mk b/soundtrigger/2.0/vts/functional/vts/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/Android.mk b/soundtrigger/2.0/vts/functional/vts/testcases/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/hal/Android.mk b/soundtrigger/2.0/vts/functional/vts/testcases/hal/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/Android.mk b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/Android.mk b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/Android.mk b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/Android.mk
new file mode 100644
index 0000000..a99f4ce
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/Android.mk
@@ -0,0 +1,25 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalSoundTriggerHidlTargetBasicTest
+VTS_CONFIG_SRC_DIR := testcases/hal/soundtrigger/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/AndroidTest.xml b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..b75d97e
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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 for VTS sound trigger HIDL HAL's basic target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="HalSoundTriggerHidlTargetBasicTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/soundtrigger_hidl_hal_test/soundtrigger_hidl_hal_test,
+ _64bit::DATA/nativetest64/soundtrigger_hidl_hal_test/soundtrigger_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="1m" />
+ </test>
+</configuration>
diff --git a/soundtrigger/Android.bp b/soundtrigger/Android.bp
index c12cd4f..8d2c986 100644
--- a/soundtrigger/Android.bp
+++ b/soundtrigger/Android.bp
@@ -1,4 +1,5 @@
// This is an autogenerated file, do not edit.
subdirs = [
"2.0",
+ "2.0/vts/functional",
]
diff --git a/soundtrigger/Android.mk b/soundtrigger/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/soundtrigger/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/tests/bar/1.0/default/Bar.cpp b/tests/bar/1.0/default/Bar.cpp
index c07e2fa..b3f971a 100644
--- a/tests/bar/1.0/default/Bar.cpp
+++ b/tests/bar/1.0/default/Bar.cpp
@@ -2,7 +2,7 @@
#define LOG_TAG "hidl_test"
#include "Bar.h"
-#include <android-base/logging.h>
+#include <android/log.h>
#include <inttypes.h>
namespace android {
diff --git a/tests/baz/1.0/IBase.hal b/tests/baz/1.0/IBase.hal
index add4153..7f90f16 100644
--- a/tests/baz/1.0/IBase.hal
+++ b/tests/baz/1.0/IBase.hal
@@ -17,7 +17,7 @@
package android.hardware.tests.baz@1.0;
interface IBase {
- enum SomeBaseEnum {
+ enum SomeBaseEnum : int32_t {
grrr = 1,
};
diff --git a/tests/expression/1.0/IExpression.hal b/tests/expression/1.0/IExpression.hal
index a44e03c..6eb5b2a 100644
--- a/tests/expression/1.0/IExpression.hal
+++ b/tests/expression/1.0/IExpression.hal
@@ -178,7 +178,7 @@
MAX_PLUS_2 // 1
};
- enum Constants {
+ enum Constants : int32_t {
CONST_FOO,
CONST_BAR = 70,
MAX_ARRAY_SIZE = 20,
diff --git a/tests/foo/1.0/default/Foo.cpp b/tests/foo/1.0/default/Foo.cpp
index 7053b44..5a51532 100644
--- a/tests/foo/1.0/default/Foo.cpp
+++ b/tests/foo/1.0/default/Foo.cpp
@@ -17,7 +17,7 @@
// Methods from ::android::hardware::tests::foo::V1_0::IFoo follow.
Return<void> Foo::doThis(float param) {
- ALOGI("SERVER(Foo) doThis(%.2f)", param);
+ LOG(INFO) << "SERVER(Foo) doThis(" << param << ")";
return Void();
}
@@ -49,7 +49,7 @@
Return<void> Foo::doSomethingElse(
const hidl_array<int32_t, 15> ¶m, doSomethingElse_cb _cb) {
- ALOGI("SERVER(Foo) doSomethingElse(...)");
+ LOG(INFO) << "SERVER(Foo) doSomethingElse(...)";
hidl_array<int32_t, 32> result;
for (size_t i = 0; i < 15; ++i) {
@@ -66,7 +66,7 @@
Return<void> Foo::doStuffAndReturnAString(
doStuffAndReturnAString_cb _cb) {
- ALOGI("SERVER(Foo) doStuffAndReturnAString");
+ LOG(INFO) << "SERVER(Foo) doStuffAndReturnAString";
_cb("Hello, world");
@@ -75,7 +75,7 @@
Return<void> Foo::mapThisVector(
const hidl_vec<int32_t> ¶m, mapThisVector_cb _cb) {
- ALOGI("SERVER(Foo) mapThisVector");
+ LOG(INFO) << "SERVER(Foo) mapThisVector";
hidl_vec<int32_t> out;
out.resize(param.size());
@@ -91,80 +91,98 @@
Return<void> Foo::callMe(
const sp<IFooCallback> &cb) {
- ALOGI("SERVER(Foo) callMe %p", cb.get());
+ LOG(INFO) << "SERVER(Foo) callMe " << cb.get();
if (cb != NULL) {
-
hidl_array<nsecs_t, 3> c;
- ALOGI("SERVER(Foo) callMe %p calling IFooCallback::heyItsYou, " \
- "should return immediately", cb.get());
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " calling IFooCallback::heyItsYou, should return immediately";
c[0] = systemTime();
cb->heyItsYou(cb);
c[0] = systemTime() - c[0];
- ALOGI("SERVER(Foo) callMe %p calling IFooCallback::heyItsYou " \
- "returned after %" PRId64 "ns", cb.get(), c[0]);
-
- ALOGI("SERVER(Foo) callMe %p calling IFooCallback::heyItsYouIsntIt, " \
- "should block for %" PRId64 " seconds", cb.get(),
- DELAY_S);
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " calling IFooCallback::heyItsYou, returned after"
+ << c[0]
+ << "ns";
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " calling IFooCallback::heyItsYouIsntIt, should block for"
+ << DELAY_S
+ << " seconds";
c[1] = systemTime();
Return<bool> ret = cb->heyItsYouIsntIt(cb);
if (!ret.isOk()) {
- ALOGE("SERVER(Foo) callMe %p encountered transport error (%d).",
- cb.get(), ret.getStatus().exceptionCode());
+ LOG(ERROR) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " encountered transport error ("
+ << ret.getStatus().exceptionCode()
+ << ").";
return Void();
}
bool answer = ret.get();
c[1] = systemTime() - c[1];
- ALOGI("SERVER(Foo) callMe %p IFooCallback::heyItsYouIsntIt " \
- "responded with %d after %" PRId64 "ns", cb.get(), answer, c[1]);
- ALOGI("SERVER(Foo) callMe %p calling " \
- "IFooCallback::heyItsTheMeaningOfLife, " \
- "should return immediately ", cb.get());
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " calling IFooCallback::heyItsYouIsntIt, responded with "
+ << answer
+ << " after "
+ << c[1]
+ << "ns";
+
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " calling IFooCallback::heyItsTheMeaningOfLife,"
+ << " should return immediately";
c[2] = systemTime();
cb->heyItsTheMeaningOfLife(42);
c[2] = systemTime() - c[2];
- ALOGI("SERVER(Foo) callMe %p After call to " \
- "IFooCallback::heyItsTheMeaningOfLife " \
- "responded after %" PRId64 "ns", cb.get(), c[2]);
- ALOGI("SERVER(Foo) callMe %p calling IFooCallback::youBlockedMeFor " \
- "to report times", cb.get());
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " cAfter call to IFooCallback::heyItsTheMeaningOfLife responded after "
+ << c[2]
+ << "ns";
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " calling IFooCallback::youBlockedMeFor to report times";
cb->youBlockedMeFor(c);
- ALOGI("SERVER(Foo) callMe %p After call to " \
- "IFooCallback::heyYouBlockedMeFor", cb.get());
+ LOG(INFO) << "SERVER(Foo) callMe "
+ << cb.get()
+ << " After call to IFooCallback::youBlockedMeFor";
}
return Void();
}
Return<Foo::SomeEnum> Foo::useAnEnum(SomeEnum param) {
- ALOGI("SERVER(Foo) useAnEnum %d", (int)param);
+ LOG(INFO) << "SERVER(Foo) useAnEnum " << (int)param;
return SomeEnum::goober;
}
Return<void> Foo::haveAGooberVec(const hidl_vec<Goober>& param) {
- ALOGI("SERVER(Foo) haveAGooberVec ¶m = %p", ¶m);
+ LOG(INFO) << "SERVER(Foo) haveAGooberVec ¶m = " << ¶m;
return Void();
}
Return<void> Foo::haveAGoober(const Goober &g) {
- ALOGI("SERVER(Foo) haveaGoober g=%p", &g);
+ LOG(INFO) << "SERVER(Foo) haveaGoober g=" << &g;
return Void();
}
Return<void> Foo::haveAGooberArray(const hidl_array<Goober, 20> & /* lots */) {
- ALOGI("SERVER(Foo) haveAGooberArray");
+ LOG(INFO) << "SERVER(Foo) haveAGooberArray";
return Void();
}
Return<void> Foo::haveATypeFromAnotherFile(const Abc &def) {
- ALOGI("SERVER(Foo) haveATypeFromAnotherFile def=%p", &def);
+ LOG(INFO) << "SERVER(Foo) haveATypeFromAnotherFile def=" << &def;
return Void();
}
@@ -172,10 +190,14 @@
Return<void> Foo::haveSomeStrings(
const hidl_array<hidl_string, 3> &array,
haveSomeStrings_cb _cb) {
- ALOGI("SERVER(Foo) haveSomeStrings([\"%s\", \"%s\", \"%s\"])",
- array[0].c_str(),
- array[1].c_str(),
- array[2].c_str());
+
+ LOG(INFO) << "SERVER(Foo) haveSomeStrings([\""
+ << array[0].c_str()
+ << "\", \""
+ << array[1].c_str()
+ << "\", \""
+ << array[2].c_str()
+ << "\"])";
hidl_array<hidl_string, 2> result;
result[0] = "Hello";
@@ -189,10 +211,13 @@
Return<void> Foo::haveAStringVec(
const hidl_vec<hidl_string> &vector,
haveAStringVec_cb _cb) {
- ALOGI("SERVER(Foo) haveAStringVec([\"%s\", \"%s\", \"%s\"])",
- vector[0].c_str(),
- vector[1].c_str(),
- vector[2].c_str());
+ LOG(INFO) << "SERVER(Foo) haveAStringVec([\""
+ << vector[0].c_str()
+ << "\", \""
+ << vector[1].c_str()
+ << "\", \""
+ << vector[2].c_str()
+ << "\"])";
hidl_vec<hidl_string> result;
result.resize(2);
@@ -207,7 +232,7 @@
Return<void> Foo::transposeMe(
const hidl_array<float, 3, 5> &in, transposeMe_cb _cb) {
- ALOGI("SERVER(Foo) transposeMe(%s)", to_string(in).c_str());
+ LOG(INFO) << "SERVER(Foo) transposeMe(" << to_string(in).c_str() << ")";
hidl_array<float, 5, 3> out;
for (size_t i = 0; i < 5; ++i) {
@@ -216,7 +241,7 @@
}
}
- ALOGI("SERVER(Foo) transposeMe returning %s", to_string(out).c_str());
+ LOG(INFO) << "SERVER(Foo) transposeMe returning " << to_string(out).c_str();
_cb(out);
@@ -225,7 +250,7 @@
Return<void> Foo::callingDrWho(
const MultiDimensional &in, callingDrWho_cb _hidl_cb) {
- ALOGI("SERVER(Foo) callingDrWho(%s)", MultiDimensionalToString(in).c_str());
+ LOG(INFO) << "SERVER(Foo) callingDrWho(" << MultiDimensionalToString(in).c_str() << ")";
MultiDimensional out;
for (size_t i = 0; i < 5; ++i) {
diff --git a/tests/foo/1.0/default/FooCallback.cpp b/tests/foo/1.0/default/FooCallback.cpp
index e4704f2..ff3a545 100644
--- a/tests/foo/1.0/default/FooCallback.cpp
+++ b/tests/foo/1.0/default/FooCallback.cpp
@@ -2,7 +2,7 @@
#define LOG_TAG "hidl_test"
#include "FooCallback.h"
-#include <android-base/logging.h>
+#include <android/log.h>
#include <hidl-test/FooHelper.h>
#include <inttypes.h>
#include <utils/Timers.h>
diff --git a/tests/inheritance/1.0/default/Child.cpp b/tests/inheritance/1.0/default/Child.cpp
index 66720b3..fd6608c 100644
--- a/tests/inheritance/1.0/default/Child.cpp
+++ b/tests/inheritance/1.0/default/Child.cpp
@@ -1,5 +1,5 @@
#define LOG_TAG "hidl_test"
-#include <android-base/logging.h>
+#include <android/log.h>
#include "Child.h"
diff --git a/tests/inheritance/1.0/default/Fetcher.cpp b/tests/inheritance/1.0/default/Fetcher.cpp
index 74f8d07..f3b576b 100644
--- a/tests/inheritance/1.0/default/Fetcher.cpp
+++ b/tests/inheritance/1.0/default/Fetcher.cpp
@@ -28,7 +28,7 @@
} else {
toSend = local;
}
- ALOGI("SERVER(Fetcher) selectService returning %p", toSend.get());
+ LOG(INFO) << "SERVER(Fetcher) selectService returning " << toSend.get();
_hidl_cb(toSend);
return Void();
}
diff --git a/tests/inheritance/1.0/default/Parent.cpp b/tests/inheritance/1.0/default/Parent.cpp
index bdd20c9..a6fd911 100644
--- a/tests/inheritance/1.0/default/Parent.cpp
+++ b/tests/inheritance/1.0/default/Parent.cpp
@@ -1,5 +1,5 @@
#define LOG_TAG "hidl_test"
-#include <android-base/logging.h>
+#include <android/log.h>
#include "Parent.h"
diff --git a/tests/pointer/1.0/default/Graph.cpp b/tests/pointer/1.0/default/Graph.cpp
index 5aa2243..9852407 100644
--- a/tests/pointer/1.0/default/Graph.cpp
+++ b/tests/pointer/1.0/default/Graph.cpp
@@ -1,5 +1,7 @@
+#define LOG_TAG "hidl_test"
+
#include "Graph.h"
-#include <android-base/logging.h>
+#include <android/log.h>
#include <hidl-test/PointerHelper.h>
#define PUSH_ERROR_IF(__cond__) if(__cond__) { errors.push_back(std::to_string(__LINE__) + ": " + #__cond__); }
diff --git a/tests/pointer/1.0/default/Pointer.cpp b/tests/pointer/1.0/default/Pointer.cpp
index d7cd772..2b4a323 100644
--- a/tests/pointer/1.0/default/Pointer.cpp
+++ b/tests/pointer/1.0/default/Pointer.cpp
@@ -1,4 +1,7 @@
+#define LOG_TAG "hidl_test"
+
#include "Pointer.h"
+#include <android/log.h>
namespace android {
namespace hardware {
@@ -7,6 +10,14 @@
namespace V1_0 {
namespace implementation {
+Return<int32_t> Pointer::getErrors() {
+ if(!errors.empty()) {
+ for(const auto& e : errors)
+ ALOGW("SERVER(Pointer) error: %s", e.c_str());
+ }
+ return errors.size();
+}
+
IPointer* HIDL_FETCH_IPointer(const char* /* name */) {
return new Pointer();
}
diff --git a/tests/pointer/1.0/default/Pointer.h b/tests/pointer/1.0/default/Pointer.h
index 87b0f56..d6e3e48 100644
--- a/tests/pointer/1.0/default/Pointer.h
+++ b/tests/pointer/1.0/default/Pointer.h
@@ -2,7 +2,6 @@
#define ANDROID_HARDWARE_TESTS_POINTER_V1_0_POINTER_H
#include <android/hardware/tests/pointer/1.0/IPointer.h>
-#include <android-base/logging.h>
#include <hidl/Status.h>
#include <hidl/MQDescriptor.h>
@@ -28,13 +27,7 @@
private:
std::vector<std::string> errors;
public:
- Return<int32_t> getErrors() {
- if(!errors.empty()) {
- for(const auto& e : errors)
- ALOGW("SERVER(Pointer) error: %s", e.c_str());
- }
- return errors.size();
- }
+ Return<int32_t> getErrors() override;
Return<void> foo1(const IPointer::Sam& s, IPointer::Sam const* s_ptr) override {
PUSH_ERROR_IF(!(&s == s_ptr));
return Void();
@@ -71,9 +64,6 @@
return Void();
}
Return<void> foo9(::android::hardware::hidl_string const* str_ref) override {
- ALOGI("SERVER(Pointer) foo9 got string @ %p (size = %ld) \"%s\"",
- str_ref->c_str(),
- (unsigned long) str_ref->size(), str_ref->c_str());
PUSH_ERROR_IF(!(strcmp(str_ref->c_str(), "meowmeowmeow") == 0));
return Void();
}
diff --git a/tests/pointer/1.0/default/lib/PointerHelper.cpp b/tests/pointer/1.0/default/lib/PointerHelper.cpp
index ed7d49a..3bc82c2 100644
--- a/tests/pointer/1.0/default/lib/PointerHelper.cpp
+++ b/tests/pointer/1.0/default/lib/PointerHelper.cpp
@@ -1,5 +1,5 @@
#define LOG_TAG "hidl_test"
-#include <android-base/logging.h>
+#include <android/log.h>
#include "PointerHelper.h"
namespace android {
diff --git a/thermal/1.0/default/Thermal.h b/thermal/1.0/default/Thermal.h
index 8212ab9..2e06289 100644
--- a/thermal/1.0/default/Thermal.h
+++ b/thermal/1.0/default/Thermal.h
@@ -1,5 +1,20 @@
-#ifndef HIDL_GENERATED_android_hardware_thermal_V1_0_Thermal_H_
-#define HIDL_GENERATED_android_hardware_thermal_V1_0_Thermal_H_
+/*
+ * Copyright (C) 2016 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.
+ */
+#ifndef ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
+#define ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
#include <android/hardware/thermal/1.0/IThermal.h>
#include <hidl/Status.h>
@@ -42,4 +57,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_thermal_V1_0_Thermal_H_
+#endif // ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
diff --git a/tv/cec/1.0/default/HdmiCec.h b/tv/cec/1.0/default/HdmiCec.h
index a41a5f0..34a3bb0 100644
--- a/tv/cec/1.0/default/HdmiCec.h
+++ b/tv/cec/1.0/default/HdmiCec.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_tv_cec_V1_0_HdmiCec_H_
-#define HIDL_GENERATED_android_hardware_tv_cec_V1_0_HdmiCec_H_
+#ifndef ANDROID_HARDWARE_TV_CEC_V1_0_HDMICEC_H
+#define ANDROID_HARDWARE_TV_CEC_V1_0_HDMICEC_H
#include <algorithm>
@@ -101,4 +101,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tv_cec_V1_0_HdmiCec_H_
+#endif // ANDROID_HARDWARE_TV_CEC_V1_0_HDMICEC_H
diff --git a/tv/input/1.0/default/TvInput.h b/tv/input/1.0/default/TvInput.h
index 81cbb20..beb69f5 100644
--- a/tv/input/1.0/default/TvInput.h
+++ b/tv/input/1.0/default/TvInput.h
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_tv_input_V1_0_TvInput_H_
-#define HIDL_GENERATED_android_hardware_tv_input_V1_0_TvInput_H_
+#ifndef ANDROID_HARDWARE_TV_INPUT_V1_0_TVINPUT_H
+#define ANDROID_HARDWARE_TV_INPUT_V1_0_TVINPUT_H
#include <android/hardware/tv/input/1.0/ITvInput.h>
#include <hidl/Status.h>
@@ -72,4 +72,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tv_input_V1_0_TvInput_H_
+#endif // ANDROID_HARDWARE_TV_INPUT_V1_0_TVINPUT_H
diff --git a/tv/input/1.0/types.hal b/tv/input/1.0/types.hal
index 89a7acc..6852c70 100644
--- a/tv/input/1.0/types.hal
+++ b/tv/input/1.0/types.hal
@@ -18,7 +18,7 @@
import android.hardware.audio.common@2.0;
-enum Result {
+enum Result : int32_t {
OK,
UNKNOWN,
NO_RESOURCE,
@@ -27,7 +27,7 @@
};
/* Type of physical TV input. */
-enum TvInputType {
+enum TvInputType : int32_t {
OTHER = 1, // Generic hardware.
TUNER = 2, // Tuner. e.g. built-in terrestrial tuner
COMPOSITE = 3,
@@ -50,7 +50,7 @@
// must be filled with 0s.
};
-enum TvInputEventType {
+enum TvInputEventType : int32_t {
/*
* Hardware notifies the framework that a device is available.
*
diff --git a/vehicle/2.0/types.hal b/vehicle/2.0/types.hal
index 65d26fb..0e0e3ea 100644
--- a/vehicle/2.0/types.hal
+++ b/vehicle/2.0/types.hal
@@ -2430,7 +2430,7 @@
};
-enum SubscribeFlags {
+enum SubscribeFlags : int32_t {
UNDEFINED = 0x0,
/*
@@ -2477,7 +2477,7 @@
};
/* Error codes used in vehicle HAL interface. */
-enum StatusCode {
+enum StatusCode : int32_t {
OK = 0,
/* Try again. */
diff --git a/vibrator/1.0/default/Vibrator.h b/vibrator/1.0/default/Vibrator.h
index 36c4cc1..061b364 100644
--- a/vibrator/1.0/default/Vibrator.h
+++ b/vibrator/1.0/default/Vibrator.h
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_vibrator_V1_0_Vibrator_H_
-#define HIDL_GENERATED_android_hardware_vibrator_V1_0_Vibrator_H_
+#ifndef ANDROID_HARDWARE_VIBRATOR_V1_0_VIBRATOR_H
+#define ANDROID_HARDWARE_VIBRATOR_V1_0_VIBRATOR_H
#include <android/hardware/vibrator/1.0/IVibrator.h>
#include <hidl/Status.h>
@@ -53,4 +53,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_vibrator_V1_0_Vibrator_H_
+#endif // ANDROID_HARDWARE_VIBRATOR_V1_0_VIBRATOR_H
diff --git a/vr/1.0/default/Vr.h b/vr/1.0/default/Vr.h
index 90694d9..dd5e764 100644
--- a/vr/1.0/default/Vr.h
+++ b/vr/1.0/default/Vr.h
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef HIDL_GENERATED_android_hardware_vr_V1_0_Vr_H_
-#define HIDL_GENERATED_android_hardware_vr_V1_0_Vr_H_
+#ifndef ANDROID_HARDWARE_VR_V1_0_VR_H
+#define ANDROID_HARDWARE_VR_V1_0_VR_H
#include <android/hardware/vr/1.0/IVr.h>
#include <hardware/vr.h>
@@ -48,4 +48,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_vr_V1_0_Vr_H_
+#endif // ANDROID_HARDWARE_VR_V1_0_VR_H
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index 066662c..9e53377 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -486,7 +486,7 @@
/**
* Mask of flags set in the |ScanData| instance.
*/
-enum StaScanDataFlagMask {
+enum StaScanDataFlagMask : int32_t {
/**
* Indicates that a scan was interrupted/did not occur so results may be
* incomplete.