diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2012-08-24 11:45:04 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2012-08-24 15:12:57 -0700 |
commit | c8101f5b14e745b348592c5609e55f121a11a6bf (patch) | |
tree | 7125393b0ce00a3717e36495e2493f3e12c6ef50 /include | |
parent | 00d1d688bd1a21aa46de00830f62b0e3ae23ec4d (diff) | |
download | hardware_libhardware_legacy-c8101f5b14e745b348592c5609e55f121a11a6bf.zip hardware_libhardware_legacy-c8101f5b14e745b348592c5609e55f121a11a6bf.tar.gz hardware_libhardware_legacy-c8101f5b14e745b348592c5609e55f121a11a6bf.tar.bz2 |
Update AudioPolicyManagerBase to only use audio_devices_t
The AudioPolicyManagerBase implementation was using some device
enum values from AudioSystemLegacy.h, of type audio_devices,
and some from /system/audio.h, of type audio_devices_t.
Now only uses audio_devices_t, and associated functions to
inspect what audio device type they correspond to.
Added #define to represent "no audio device" to clarify code.
Removed unused variable in AudioPolicyManagerBase::startOutput()
Change-Id: Ibec311dac550d6a806397377206a43bc708914c0
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware_legacy/AudioPolicyInterface.h | 4 | ||||
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 4 | ||||
-rw-r--r-- | include/hardware_legacy/AudioSystemLegacy.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/include/hardware_legacy/AudioPolicyInterface.h b/include/hardware_legacy/AudioPolicyInterface.h index adb2db6..3ff68b9 100644 --- a/include/hardware_legacy/AudioPolicyInterface.h +++ b/include/hardware_legacy/AudioPolicyInterface.h @@ -66,11 +66,11 @@ public: // // indicate a change in device connection status - virtual status_t setDeviceConnectionState(AudioSystem::audio_devices device, + virtual status_t setDeviceConnectionState(audio_devices_t device, AudioSystem::device_connection_state state, const char *device_address) = 0; // retrieve a device connection status - virtual AudioSystem::device_connection_state getDeviceConnectionState(AudioSystem::audio_devices device, + virtual AudioSystem::device_connection_state getDeviceConnectionState(audio_devices_t device, const char *device_address) = 0; // indicate a change in phone state. Valid phones states are defined by AudioSystem::audio_mode virtual void setPhoneState(int state) = 0; diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index 0f75d7a..5030e40 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -72,10 +72,10 @@ public: virtual ~AudioPolicyManagerBase(); // AudioPolicyInterface - virtual status_t setDeviceConnectionState(AudioSystem::audio_devices device, + virtual status_t setDeviceConnectionState(audio_devices_t device, AudioSystem::device_connection_state state, const char *device_address); - virtual AudioSystem::device_connection_state getDeviceConnectionState(AudioSystem::audio_devices device, + virtual AudioSystem::device_connection_state getDeviceConnectionState(audio_devices_t device, const char *device_address); virtual void setPhoneState(int state); virtual void setForceUse(AudioSystem::force_use usage, AudioSystem::forced_config config); diff --git a/include/hardware_legacy/AudioSystemLegacy.h b/include/hardware_legacy/AudioSystemLegacy.h index a40622a..93e0462 100644 --- a/include/hardware_legacy/AudioSystemLegacy.h +++ b/include/hardware_legacy/AudioSystemLegacy.h @@ -226,6 +226,8 @@ public: TX_DISABLE = 0 }; + // DO NOT USE: the "audio_devices" enumeration below is obsolete, use type "audio_devices_t" and + // audio device enumeration from system/audio.h instead. enum audio_devices { // output devices DEVICE_OUT_EARPIECE = 0x1, |