summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-08-07 09:08:36 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-08-07 09:08:36 -0700
commitdfbea2f39715c64adf1e99844945b4e4e816ddba (patch)
tree2a1b2a6b22d8bc3deb35e1bda33621eb4c50ece5 /libs/audioflinger
parente0e9ecc0ce17cce2e681d099426da9d4d3d83377 (diff)
parent764db963fa36b4a272e8c4a77cbe9610404a3b11 (diff)
downloadframeworks_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.cpp4
-rw-r--r--libs/audioflinger/AudioHardwareStub.cpp12
-rw-r--r--libs/audioflinger/AudioHardwareStub.h4
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