From 36678b2b16b8e5bf840fc4b5293cad11e769bf49 Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Mon, 8 Jul 2019 15:26:34 -0700 Subject: [PATCH] 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 Merged-In: I18e1e3fccad3d41372f3c5c046af4f6ffd83328b --- audio/core/all-versions/default/Device.cpp | 2 +- audio/core/all-versions/default/Stream.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/core/all-versions/default/Device.cpp b/audio/core/all-versions/default/Device.cpp index bec22df6d5..1a9df217e1 100644 --- a/audio/core/all-versions/default/Device.cpp +++ b/audio/core/all-versions/default/Device.cpp @@ -378,7 +378,7 @@ Return Device::getMicrophones(getMicrophones_cb _hidl_cb) { } Return 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 diff --git a/audio/core/all-versions/default/Stream.cpp b/audio/core/all-versions/default/Stream.cpp index b995657087..e62f6d3b0a 100644 --- a/audio/core/all-versions/default/Stream.cpp +++ b/audio/core/all-versions/default/Stream.cpp @@ -243,8 +243,8 @@ Return Stream::setParameters(const hidl_vec& parameters) Return 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 Stream::getDevices(getDevices_cb _hidl_cb) {