diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-07 09:08:36 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-07 09:08:36 -0700 |
commit | dfbea2f39715c64adf1e99844945b4e4e816ddba (patch) | |
tree | 2a1b2a6b22d8bc3deb35e1bda33621eb4c50ece5 /libs/audioflinger | |
parent | e0e9ecc0ce17cce2e681d099426da9d4d3d83377 (diff) | |
parent | 764db963fa36b4a272e8c4a77cbe9610404a3b11 (diff) | |
download | frameworks_native-dfbea2f39715c64adf1e99844945b4e4e816ddba.zip frameworks_native-dfbea2f39715c64adf1e99844945b4e4e816ddba.tar.gz frameworks_native-dfbea2f39715c64adf1e99844945b4e4e816ddba.tar.bz2 |
Merge change 9653
* changes:
Fix getParameters() default implementation.
Diffstat (limited to 'libs/audioflinger')
-rw-r--r-- | libs/audioflinger/AudioHardwareInterface.cpp | 4 | ||||
-rw-r--r-- | libs/audioflinger/AudioHardwareStub.cpp | 12 | ||||
-rw-r--r-- | libs/audioflinger/AudioHardwareStub.h | 4 |
3 files changed, 16 insertions, 4 deletions
diff --git a/libs/audioflinger/AudioHardwareInterface.cpp b/libs/audioflinger/AudioHardwareInterface.cpp index 37be329..9a4a7f9 100644 --- a/libs/audioflinger/AudioHardwareInterface.cpp +++ b/libs/audioflinger/AudioHardwareInterface.cpp @@ -140,8 +140,8 @@ status_t AudioHardwareBase::setParameters(const String8& keyValuePairs) // default implementation String8 AudioHardwareBase::getParameters(const String8& keys) { - String8 result = String8(""); - return result; + AudioParameter param = AudioParameter(keys); + return param.toString(); } // default implementation diff --git a/libs/audioflinger/AudioHardwareStub.cpp b/libs/audioflinger/AudioHardwareStub.cpp index 1a03059..ae391ee 100644 --- a/libs/audioflinger/AudioHardwareStub.cpp +++ b/libs/audioflinger/AudioHardwareStub.cpp @@ -152,6 +152,12 @@ status_t AudioStreamOutStub::dump(int fd, const Vector<String16>& args) return NO_ERROR; } +String8 AudioStreamOutStub::getParameters(const String8& keys) +{ + AudioParameter param = AudioParameter(keys); + return param.toString(); +} + // ---------------------------------------------------------------------------- status_t AudioStreamInStub::set(int *pFormat, uint32_t *pChannels, uint32_t *pRate, @@ -187,6 +193,12 @@ status_t AudioStreamInStub::dump(int fd, const Vector<String16>& args) return NO_ERROR; } +String8 AudioStreamInStub::getParameters(const String8& keys) +{ + AudioParameter param = AudioParameter(keys); + return param.toString(); +} + // ---------------------------------------------------------------------------- }; // namespace android diff --git a/libs/audioflinger/AudioHardwareStub.h b/libs/audioflinger/AudioHardwareStub.h index 8f43259..583f852 100644 --- a/libs/audioflinger/AudioHardwareStub.h +++ b/libs/audioflinger/AudioHardwareStub.h @@ -40,7 +40,7 @@ public: virtual status_t standby(); virtual status_t dump(int fd, const Vector<String16>& args); virtual status_t setParameters(const String8& keyValuePairs) { return NO_ERROR;} - virtual String8 getParameters(const String8& keys) {String8 result = String8(""); return result;} + virtual String8 getParameters(const String8& keys); }; class AudioStreamInStub : public AudioStreamIn { @@ -55,7 +55,7 @@ public: virtual status_t dump(int fd, const Vector<String16>& args); virtual status_t standby() { return NO_ERROR; } virtual status_t setParameters(const String8& keyValuePairs) { return NO_ERROR;} - virtual String8 getParameters(const String8& keys) {String8 result = String8(""); return result;} + virtual String8 getParameters(const String8& keys); }; class AudioHardwareStub : public AudioHardwareBase |