Fix the name of the constant for device [dis]connect parameter

During the transition to Treble, "device connect" / "disconnect"
parameter was erroneously attributed to audio streams. This
issue got fixed in Audio HAL V4.0, but AudioParameter file
was still using incorrect name for the constant.

Test: make
Change-Id: I18e1e3fccad3d41372f3c5c046af4f6ffd83328b
This commit is contained in:
Mikhail Naganov
2019-07-08 15:26:34 -07:00
parent 84af4f6e7e
commit 98f2715168
2 changed files with 3 additions and 3 deletions

View File

@@ -378,7 +378,7 @@ Return<void> Device::getMicrophones(getMicrophones_cb _hidl_cb) {
}
Return<Result> Device::setConnectedState(const DeviceAddress& address, bool connected) {
auto key = connected ? AudioParameter::keyStreamConnect : AudioParameter::keyStreamDisconnect;
auto key = connected ? AudioParameter::keyDeviceConnect : AudioParameter::keyDeviceDisconnect;
return setParam(key, address);
}
#endif

View File

@@ -243,8 +243,8 @@ Return<Result> Stream::setParameters(const hidl_vec<ParameterValue>& parameters)
Return<Result> Stream::setConnectedState(const DeviceAddress& address, bool connected) {
return setParam(
connected ? AudioParameter::keyStreamConnect : AudioParameter::keyStreamDisconnect,
address);
connected ? AudioParameter::keyDeviceConnect : AudioParameter::keyDeviceDisconnect,
address);
}
#elif MAJOR_VERSION >= 4
Return<void> Stream::getDevices(getDevices_cb _hidl_cb) {