Merge "Always specify underlying enum type."

This commit is contained in:
TreeHugger Robot 2016-11-30 18:12:35 +00:00 committed by Android (Google) Code Review
commit a5ee7b0b93
18 changed files with 41 additions and 41 deletions

View file

@ -22,7 +22,7 @@ import IDevice;
interface IDevicesFactory { interface IDevicesFactory {
typedef android.hardware.audio@2.0::Result Result; typedef android.hardware.audio@2.0::Result Result;
enum Device { enum Device : int32_t {
PRIMARY, PRIMARY,
A2DP, A2DP,
USB, USB,

View file

@ -76,7 +76,7 @@ interface IPrimaryDevice extends IDevice {
*/ */
setBtScoWidebandEnabled(bool enabled) generates (Result retval); setBtScoWidebandEnabled(bool enabled) generates (Result retval);
enum TtyMode { enum TtyMode : int32_t {
OFF, OFF,
VCO, VCO,
HCO, HCO,

View file

@ -18,7 +18,7 @@ package android.hardware.audio@2.0;
import android.hardware.audio.common@2.0; import android.hardware.audio.common@2.0;
enum Result { enum Result : int32_t {
OK, OK,
NOT_INITIALIZED, NOT_INITIALIZED,
INVALID_ARGUMENTS, INVALID_ARGUMENTS,
@ -27,7 +27,7 @@ enum Result {
}; };
@export(name="audio_drain_type_t", value_prefix="AUDIO_DRAIN_") @export(name="audio_drain_type_t", value_prefix="AUDIO_DRAIN_")
enum AudioDrain { enum AudioDrain : int32_t {
/* drain() returns when all data has been played. */ /* drain() returns when all data has been played. */
ALL, ALL,
/* drain() returns a short time before all data from the current track has /* drain() returns a short time before all data from the current track has

View file

@ -56,7 +56,7 @@ typedef uint32_t AudioHwSync;
* Each port has a unique ID or handle allocated by policy manager. * Each port has a unique ID or handle allocated by policy manager.
*/ */
@export(name="") @export(name="")
enum AudioHandleConsts { enum AudioHandleConsts : int32_t {
AUDIO_IO_HANDLE_NONE = 0, AUDIO_IO_HANDLE_NONE = 0,
AUDIO_MODULE_HANDLE_NONE = 0, AUDIO_MODULE_HANDLE_NONE = 0,
AUDIO_PORT_HANDLE_NONE = 0, AUDIO_PORT_HANDLE_NONE = 0,
@ -114,7 +114,7 @@ enum AudioStreamType : int32_t {
}; };
@export(name="audio_source_t", value_prefix="AUDIO_SOURCE_") @export(name="audio_source_t", value_prefix="AUDIO_SOURCE_")
enum AudioSource { enum AudioSource : int32_t {
// These values must kept in sync with // These values must kept in sync with
// frameworks/base/media/java/android/media/MediaRecorder.java, // frameworks/base/media/java/android/media/MediaRecorder.java,
// frameworks/av/services/audiopolicy/AudioPolicyService.cpp, // frameworks/av/services/audiopolicy/AudioPolicyService.cpp,
@ -269,7 +269,7 @@ enum AudioFormat : uint32_t {
* assumptions. * assumptions.
*/ */
@export(name="") @export(name="")
enum FixedChannelCount { enum FixedChannelCount : int32_t {
FCC_2 = 2, // This is typically due to legacy implementation of stereo I/O 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 FCC_8 = 8 // This is typically due to audio mixer and resampler limitations
}; };
@ -425,7 +425,7 @@ enum AudioChannelMask : uint32_t {
* to this convention will be noted at the appropriate API. * to this convention will be noted at the appropriate API.
*/ */
@export(name="", value_prefix="AUDIO_INTERLEAVE_") @export(name="", value_prefix="AUDIO_INTERLEAVE_")
enum AudioInterleave { enum AudioInterleave : int32_t {
LEFT = 0, LEFT = 0,
RIGHT = 1, RIGHT = 1,
}; };
@ -435,7 +435,7 @@ enum AudioInterleave {
* routing. * routing.
*/ */
@export(name="audio_mode_t", value_prefix="AUDIO_MODE_") @export(name="audio_mode_t", value_prefix="AUDIO_MODE_")
enum AudioMode { enum AudioMode : int32_t {
INVALID = -2, INVALID = -2,
CURRENT = -1, CURRENT = -1,
NORMAL = 0, NORMAL = 0,
@ -597,7 +597,7 @@ enum AudioDevice : uint32_t {
* (when getOuput() is called) to an available output stream. * (when getOuput() is called) to an available output stream.
*/ */
@export(name="audio_output_flags_t", value_prefix="AUDIO_OUTPUT_FLAG_") @export(name="audio_output_flags_t", value_prefix="AUDIO_OUTPUT_FLAG_")
enum AudioOutputFlag { enum AudioOutputFlag : int32_t {
NONE = 0x0, // no attributes NONE = 0x0, // no attributes
DIRECT = 0x1, // this output directly connects a track DIRECT = 0x1, // this output directly connects a track
// to one output stream: no software mixer // to one output stream: no software mixer
@ -627,7 +627,7 @@ enum AudioOutputFlag {
* attributes corresponding to the specified flags. * attributes corresponding to the specified flags.
*/ */
@export(name="audio_input_flags_t", value_prefix="AUDIO_INPUT_FLAG_") @export(name="audio_input_flags_t", value_prefix="AUDIO_INPUT_FLAG_")
enum AudioInputFlag { enum AudioInputFlag : int32_t {
NONE = 0x0, // no attributes NONE = 0x0, // no attributes
FAST = 0x1, // prefer an input that supports "fast tracks" FAST = 0x1, // prefer an input that supports "fast tracks"
HW_HOTWORD = 0x2, // prefer an input that captures from hw hotword source HW_HOTWORD = 0x2, // prefer an input that captures from hw hotword source
@ -728,7 +728,7 @@ struct AudioGainConfig {
/* Audio port role: either source or sink */ /* Audio port role: either source or sink */
@export(name="audio_port_role_t", value_prefix="AUDIO_PORT_ROLE_") @export(name="audio_port_role_t", value_prefix="AUDIO_PORT_ROLE_")
enum AudioPortRole { enum AudioPortRole : int32_t {
NONE, NONE,
SOURCE, SOURCE,
SINK, SINK,
@ -739,7 +739,7 @@ enum AudioPortRole {
* PlaybackThread output) or a physical device (e.g OUT_SPEAKER) * PlaybackThread output) or a physical device (e.g OUT_SPEAKER)
*/ */
@export(name="audio_port_type_t", value_prefix="AUDIO_PORT_TYPE_") @export(name="audio_port_type_t", value_prefix="AUDIO_PORT_TYPE_")
enum AudioPortType { enum AudioPortType : int32_t {
NONE, NONE,
DEVICE, DEVICE,
MIX, MIX,
@ -816,7 +816,7 @@ struct AudioPortDeviceExt {
* Latency class of the audio mix. * Latency class of the audio mix.
*/ */
@export(name="audio_mix_latency_class_t", value_prefix="AUDIO_LATENCY_") @export(name="audio_mix_latency_class_t", value_prefix="AUDIO_LATENCY_")
enum AudioMixLatencyClass { enum AudioMixLatencyClass : int32_t {
LOW, LOW,
NORMAL NORMAL
} ; } ;

View file

@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
import IEffect; import IEffect;
interface IDownmixEffect extends IEffect { interface IDownmixEffect extends IEffect {
enum Type { enum Type : int32_t {
STRIP, // throw away the extra channels STRIP, // throw away the extra channels
FOLD // mix the extra channels with FL/FR FOLD // mix the extra channels with FL/FR
}; };

View file

@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
import IEffect; import IEffect;
interface INoiseSuppressionEffect extends IEffect { interface INoiseSuppressionEffect extends IEffect {
enum Level { enum Level : int32_t {
LOW, LOW,
MEDIUM, MEDIUM,
HIGH HIGH
@ -36,7 +36,7 @@ interface INoiseSuppressionEffect extends IEffect {
*/ */
getSuppressionLevel() generates (Result retval, Level level); getSuppressionLevel() generates (Result retval, Level level);
enum Type { enum Type : int32_t {
SINGLE_CHANNEL, SINGLE_CHANNEL,
MULTI_CHANNEL MULTI_CHANNEL
}; };

View file

@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
import IEffect; import IEffect;
interface IPresetReverbEffect extends IEffect { interface IPresetReverbEffect extends IEffect {
enum Preset { enum Preset : int32_t {
NONE, // no reverb or reflections NONE, // no reverb or reflections
SMALLROOM, // a small room less than five meters in length SMALLROOM, // a small room less than five meters in length
MEDIUMROOM, // a medium room with a length of ten meters or less MEDIUMROOM, // a medium room with a length of ten meters or less

View file

@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
import IEffect; import IEffect;
interface IVisualizerEffect extends IEffect { interface IVisualizerEffect extends IEffect {
enum CaptureSizeRange { enum CaptureSizeRange : int32_t {
MAX = 1024, // maximum capture size in samples MAX = 1024, // maximum capture size in samples
MIN = 128 // minimum capture size in samples MIN = 128 // minimum capture size in samples
}; };
@ -35,7 +35,7 @@ interface IVisualizerEffect extends IEffect {
*/ */
getCaptureSize() generates (Result retval, uint16_t captureSize); getCaptureSize() generates (Result retval, uint16_t captureSize);
enum ScalingMode { enum ScalingMode : int32_t {
// Keep in sync with SCALING_MODE_... in // Keep in sync with SCALING_MODE_... in
// frameworks/base/media/java/android/media/audiofx/Visualizer.java // frameworks/base/media/java/android/media/audiofx/Visualizer.java
NORMALIZED = 0, NORMALIZED = 0,
@ -62,7 +62,7 @@ interface IVisualizerEffect extends IEffect {
*/ */
getLatency() generates (Result retval, uint32_t latencyMs); getLatency() generates (Result retval, uint32_t latencyMs);
enum MeasurementMode { enum MeasurementMode : int32_t {
// Keep in sync with MEASUREMENT_MODE_... in // Keep in sync with MEASUREMENT_MODE_... in
// frameworks/base/media/java/android/media/audiofx/Visualizer.java // frameworks/base/media/java/android/media/audiofx/Visualizer.java
NONE = 0x0, NONE = 0x0,

View file

@ -18,7 +18,7 @@ package android.hardware.audio.effect@2.0;
import android.hardware.audio.common@2.0; import android.hardware.audio.common@2.0;
enum Result { enum Result : int32_t {
OK, OK,
NOT_INITIALIZED, NOT_INITIALIZED,
INVALID_ARGUMENTS, INVALID_ARGUMENTS,
@ -110,7 +110,7 @@ enum Result {
* +----------------+--------+-------------------------------------------------- * +----------------+--------+--------------------------------------------------
*/ */
@export(name="", value_prefix="EFFECT_FLAG_") @export(name="", value_prefix="EFFECT_FLAG_")
enum EffectFlags { enum EffectFlags : int32_t {
// Insert mode // Insert mode
TYPE_SHIFT = 0, TYPE_SHIFT = 0,
TYPE_SIZE = 3, TYPE_SIZE = 3,
@ -229,7 +229,7 @@ struct AudioBuffer {
}; };
@export(name="effect_buffer_access_e", value_prefix="EFFECT_BUFFER_") @export(name="effect_buffer_access_e", value_prefix="EFFECT_BUFFER_")
enum EffectBufferAccess { enum EffectBufferAccess : int32_t {
ACCESS_WRITE, ACCESS_WRITE,
ACCESS_READ, ACCESS_READ,
ACCESS_ACCUMULATE ACCESS_ACCUMULATE
@ -239,7 +239,7 @@ enum EffectBufferAccess {
* Determines what fields of EffectBufferConfig need to be considered. * Determines what fields of EffectBufferConfig need to be considered.
*/ */
@export(name="", value_prefix="EFFECT_CONFIG_") @export(name="", value_prefix="EFFECT_CONFIG_")
enum EffectConfigParameters { enum EffectConfigParameters : int32_t {
BUFFER = 0x0001, // buffer field BUFFER = 0x0001, // buffer field
SMP_RATE = 0x0002, // samplingRate SMP_RATE = 0x0002, // samplingRate
CHANNELS = 0x0004, // channels CHANNELS = 0x0004, // channels
@ -267,7 +267,7 @@ struct EffectConfig {
}; };
@export(name="effect_feature_e", value_prefix="EFFECT_FEATURE_") @export(name="effect_feature_e", value_prefix="EFFECT_FEATURE_")
enum EffectFeature { enum EffectFeature : int32_t {
AUX_CHANNELS, // supports auxiliary channels AUX_CHANNELS, // supports auxiliary channels
// (e.g. dual mic noise suppressor) // (e.g. dual mic noise suppressor)
CNT CNT

View file

@ -16,7 +16,7 @@
package android.hardware.broadcastradio@1.0; package android.hardware.broadcastradio@1.0;
enum Result { enum Result : int32_t {
OK, OK,
NOT_INITIALIZED, NOT_INITIALIZED,
INVALID_ARGUMENTS, INVALID_ARGUMENTS,
@ -139,7 +139,7 @@ struct Properties {
vec<BandConfig> bands; /* band descriptors */ vec<BandConfig> bands; /* band descriptors */
}; };
enum MetadataType { enum MetadataType : int32_t {
INVALID = -1, INVALID = -1,
/* Signed 32 bit integer */ /* Signed 32 bit integer */
INT = 0, INT = 0,
@ -152,7 +152,7 @@ enum MetadataType {
CLOCK = 3, CLOCK = 3,
}; };
enum MetadataKey { enum MetadataKey : int32_t {
INVALID = -1, INVALID = -1,
/* RDS PI - string */ /* RDS PI - string */
RDS_PI = 0, RDS_PI = 0,

View file

@ -138,7 +138,7 @@ enum AsyncEventType : uint32_t {
RESTARTED = 1, // Hub restarted unexpectedly RESTARTED = 1, // Hub restarted unexpectedly
}; };
enum TransactionResult { enum TransactionResult : int32_t {
SUCCESS, // successful completion of transaction SUCCESS, // successful completion of transaction
FAILURE, // failed transaction FAILURE, // failed transaction
}; };

View file

@ -41,7 +41,7 @@ interface IAGnssRil {
WIMAX = 6, WIMAX = 6,
}; };
enum AGnssRefLocationType { enum AGnssRefLocationType : int32_t {
GSM_CELLID = 1, GSM_CELLID = 1,
UMTS_CELLID = 2, UMTS_CELLID = 2,
MAC = 3, MAC = 3,

View file

@ -112,7 +112,7 @@ struct CodecBuffer {
/** /**
* There are four main types of buffers. * There are four main types of buffers.
*/ */
enum Type { enum Type : int32_t {
INVALID = 0, INVALID = 0,
PRESET, PRESET,
SHARED_MEM, SHARED_MEM,
@ -164,7 +164,7 @@ struct CodecBuffer {
* *
* Enumeration of port modes. * Enumeration of port modes.
*/ */
enum PortMode { enum PortMode : int32_t {
PRESET_START = 0, PRESET_START = 0,
PRESET_BYTE_BUFFER, PRESET_BYTE_BUFFER,
PRESET_ANW_BUFFER, PRESET_ANW_BUFFER,

View file

@ -17,7 +17,7 @@
package android.hardware.tests.baz@1.0; package android.hardware.tests.baz@1.0;
interface IBase { interface IBase {
enum SomeBaseEnum { enum SomeBaseEnum : int32_t {
grrr = 1, grrr = 1,
}; };

View file

@ -178,7 +178,7 @@ interface IExpression {
MAX_PLUS_2 // 1 MAX_PLUS_2 // 1
}; };
enum Constants { enum Constants : int32_t {
CONST_FOO, CONST_FOO,
CONST_BAR = 70, CONST_BAR = 70,
MAX_ARRAY_SIZE = 20, MAX_ARRAY_SIZE = 20,

View file

@ -18,7 +18,7 @@ package android.hardware.tv.input@1.0;
import android.hardware.audio.common@2.0; import android.hardware.audio.common@2.0;
enum Result { enum Result : int32_t {
OK, OK,
UNKNOWN, UNKNOWN,
NO_RESOURCE, NO_RESOURCE,
@ -27,7 +27,7 @@ enum Result {
}; };
/* Type of physical TV input. */ /* Type of physical TV input. */
enum TvInputType { enum TvInputType : int32_t {
OTHER = 1, // Generic hardware. OTHER = 1, // Generic hardware.
TUNER = 2, // Tuner. e.g. built-in terrestrial tuner TUNER = 2, // Tuner. e.g. built-in terrestrial tuner
COMPOSITE = 3, COMPOSITE = 3,
@ -50,7 +50,7 @@ struct TvInputDeviceInfo {
// must be filled with 0s. // must be filled with 0s.
}; };
enum TvInputEventType { enum TvInputEventType : int32_t {
/* /*
* Hardware notifies the framework that a device is available. * Hardware notifies the framework that a device is available.
* *

View file

@ -2430,7 +2430,7 @@ enum VehiclePropertyOperation : int32_t {
}; };
enum SubscribeFlags { enum SubscribeFlags : int32_t {
UNDEFINED = 0x0, UNDEFINED = 0x0,
/* /*
@ -2477,7 +2477,7 @@ struct SubscribeOptions {
}; };
/* Error codes used in vehicle HAL interface. */ /* Error codes used in vehicle HAL interface. */
enum StatusCode { enum StatusCode : int32_t {
OK = 0, OK = 0,
/* Try again. */ /* Try again. */

View file

@ -486,7 +486,7 @@ struct StaScanResult {
/** /**
* Mask of flags set in the |ScanData| instance. * 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 * Indicates that a scan was interrupted/did not occur so results may be
* incomplete. * incomplete.