From: Pawel Andruszkiewicz Date: Tue, 6 Oct 2015 06:40:56 +0000 (+0200) Subject: [FmRadio] Method start() should change frequency in PLAYING state. X-Git-Tag: submit/tizen/20151026.073646^2^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2719fbf2fe695b79d350adbf9cf1d84cb1132041;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [FmRadio] Method start() should change frequency in PLAYING state. Fixes: TNEF-6216 [Validation] TCT pass rate (r47): 100% Change-Id: I6532535725a0fa469fccacceaf415cac8bbb6817 Signed-off-by: Pawel Andruszkiewicz --- diff --git a/src/radio/radio_manager.cc b/src/radio/radio_manager.cc index e75970e1..1e122f5b 100755 --- a/src/radio/radio_manager.cc +++ b/src/radio/radio_manager.cc @@ -366,10 +366,7 @@ PlatformResult FMRadioManager::Start(double frequency) { return GetPlatformResult("radio_get_state() failed.", err); } - if (RADIO_STATE_READY != state) { - if (RADIO_STATE_PLAYING == state) { - return PlatformResult(ErrorCode::NO_ERROR); - } + if (RADIO_STATE_READY != state && RADIO_STATE_PLAYING != state) { return PlatformResult(ErrorCode::INVALID_STATE_ERR, "Invalid radio state."); } @@ -379,7 +376,11 @@ PlatformResult FMRadioManager::Start(double frequency) { return result; } - return CheckError("radio_start", radio_start(radio_instance_)); + if (RADIO_STATE_READY == state) { + return CheckError("radio_start", radio_start(radio_instance_)); + } else { + return result; + } } PlatformResult FMRadioManager::Stop() {