From: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics Date: Mon, 23 Jan 2023 13:43:27 +0000 (+0100) Subject: [Sound] Deprecation of 'activation' concept and adding 'running' concept X-Git-Tag: accepted/tizen/unified/20230202.015309~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F287185%2F1;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Sound] Deprecation of 'activation' concept and adding 'running' concept [ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-288 [Verification] TCT passrate 100% Change-Id: Icae15c2e48f8157fb490925143fb16b25b0e966e --- diff --git a/src/sound/sound_api.js b/src/sound/sound_api.js index fb0c376f..50de95e9 100644 --- a/src/sound/sound_api.js +++ b/src/sound/sound_api.js @@ -229,6 +229,12 @@ SoundManager.prototype.getConnectedDeviceList = function() { }; SoundManager.prototype.getActivatedDeviceList = function() { + utils_.deprecationWarn( + 'getActivatedDeviceList() is deprecated and will be ' + + 'removed from next release. ' + + 'Use getRunningDeviceList() instead.', + '7.5' + ); var result = native_.callSync('SoundManagerGetActivatedDeviceList', {}); if (native_.isFailure(result)) { throw native_.getErrorObject(result); @@ -267,7 +273,8 @@ function SoundDeviceInfo(data) { device: { value: data.device, writable: false, enumerable: true }, direction: { value: data.direction, writable: false, enumerable: true }, isConnected: { value: data.isConnected, writable: false, enumerable: true }, - isActivated: { value: data.isActivated, writable: false, enumerable: true } + isActivated: { value: data.isRunning, writable: false, enumerable: true }, // isActivated already uses isRunning concept for a while + isRunning: { value: data.isRunning, writable: false, enumerable: true } }); } diff --git a/src/sound/sound_instance.cc b/src/sound/sound_instance.cc index a9e4462d..71214267 100644 --- a/src/sound/sound_instance.cc +++ b/src/sound/sound_instance.cc @@ -177,6 +177,11 @@ void SoundInstance::SoundManagerGetConnectedDeviceList(const picojson::value& ar void SoundInstance::SoundManagerGetActivatedDeviceList(const picojson::value& args, picojson::object& out) { ScopeLogger(); + DEPRECATION_WARN( + "'Activated' concept is deprecated and replated with 'running' concept. " + "getActivatedDeviceList() is deprecated and will be removed from next release." + "Use getConnectedDeviceList() instead and check isRunning property to get running devices.", + "7.5"); manager_.GetDeviceList((sound_device_mask_e)SOUND_DEVICE_STATE_DEPRECATED_ACTIVATED_MASK, out); } diff --git a/src/sound/sound_manager.cc b/src/sound/sound_manager.cc index fcbe1691..23c8cdb1 100644 --- a/src/sound/sound_manager.cc +++ b/src/sound/sound_manager.cc @@ -514,7 +514,7 @@ PlatformResult SoundManager::GetDeviceInfo(sound_device_h device, bool is_connec ErrorCode::UNKNOWN_ERR, "Getting device state failed", ("sound_manager_is_device_running error: %d (%s)", ret, get_error_message(ret))); } - obj->insert(std::make_pair("isActivated", picojson::value(state))); + obj->insert(std::make_pair("isRunning", picojson::value(state))); // get connection if (check_connection) {