From 2719fbf2fe695b79d350adbf9cf1d84cb1132041 Mon Sep 17 00:00:00 2001 From: Pawel Andruszkiewicz Date: Tue, 6 Oct 2015 08:40:56 +0200 Subject: [PATCH] [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 --- src/radio/radio_manager.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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() { -- 2.34.1