diff options
6 files changed, 4 insertions, 116 deletions
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h index 7a55332220..75c3aff10b 100644 --- a/src/components/application_manager/include/application_manager/application_manager_impl.h +++ b/src/components/application_manager/include/application_manager/application_manager_impl.h @@ -271,7 +271,6 @@ class ApplicationManagerImpl const std::string& device_id, const std::string& policy_app_id) const OVERRIDE; - uint32_t GetDeviceHandle(uint32_t connection_key) OVERRIDE; /** * @brief ChangeAppsHMILevel the function that will change application's * hmi level. @@ -281,32 +280,6 @@ class ApplicationManagerImpl * @param level new hmi level for certain application. */ void ChangeAppsHMILevel(uint32_t app_id, mobile_apis::HMILevel::eType level); - /** - * @brief MakeAppNotAudible allows to make certain application not audible. - * - * @param app_id applicatin's id whose audible state should be changed. - */ - void MakeAppNotAudible(uint32_t app_id); - - /** - * @brief MakeAppFullScreen allows ti change application's properties - * in order to make it full screen. - * - * @param app_id the id of application which should be in full screen mode. - * - * @return true if operation was success, false otherwise. - */ - bool MakeAppFullScreen(uint32_t app_id); - - /** - * @brief Checks HMI level and returns true if audio streaming is allowed - */ - bool IsAudioStreamingAllowed(uint32_t connection_key) const OVERRIDE; - - /** - * @brief Checks HMI level and returns true if video streaming is allowed - */ - bool IsVideoStreamingAllowed(uint32_t connection_key) const OVERRIDE; void Erase(ApplicationSharedPtr app_to_remove) { DCHECK(app_to_remove); diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 8d6efd85ae..feb5437ebc 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -4076,35 +4076,6 @@ std::vector<std::string> ApplicationManagerImpl::devices( return devices; } -bool ApplicationManagerImpl::IsAudioStreamingAllowed( - uint32_t application_key) const { - ApplicationSharedPtr app = application(application_key); - - using namespace mobile_apis::HMILevel; - using namespace helpers; - if (!app) { - LOG4CXX_WARN(logger_, "An application is not registered."); - return false; - } - - return Compare<eType, EQ, ONE>(app->hmi_level(), HMI_FULL, HMI_LIMITED); -} - -bool ApplicationManagerImpl::IsVideoStreamingAllowed( - uint32_t application_key) const { - ApplicationSharedPtr app = application(application_key); - using namespace mobile_apis::HMILevel; - using namespace helpers; - - if (!app) { - LOG4CXX_WARN(logger_, "An application is not registered."); - return false; - } - - LOG4CXX_DEBUG(logger_, "HMILevel: " << app->hmi_level()); - return Compare<eType, EQ, ONE>(app->hmi_level(), HMI_FULL, HMI_LIMITED); -} - void ApplicationManagerImpl::ChangeAppsHMILevel( uint32_t app_id, mobile_apis::HMILevel::eType level) { using namespace mobile_apis::HMILevel; @@ -4126,46 +4097,6 @@ void ApplicationManagerImpl::ChangeAppsHMILevel( } } -void ApplicationManagerImpl::MakeAppNotAudible(uint32_t app_id) { - using namespace mobile_apis; - ApplicationSharedPtr app = application(app_id); - if (!app) { - LOG4CXX_ERROR(logger_, "There is no app with id: " << app_id); - return; - } - ChangeAppsHMILevel(app_id, HMILevel::HMI_BACKGROUND); - app->set_audio_streaming_state(AudioStreamingState::NOT_AUDIBLE); -} - -bool ApplicationManagerImpl::MakeAppFullScreen(uint32_t app_id) { - using namespace mobile_apis; - ApplicationSharedPtr app = application(app_id); - if (!app) { - LOG4CXX_ERROR(logger_, "There is no app with id: " << app_id); - return false; - } - - ChangeAppsHMILevel(app_id, HMILevel::HMI_FULL); - if (app->is_media_application() || app->is_navi()) { - app->set_audio_streaming_state(AudioStreamingState::AUDIBLE); - } - app->set_system_context(SystemContext::SYSCTXT_MAIN); - - if (!app->has_been_activated()) { - app->set_activated(true); - } - - return true; -} - -uint32_t ApplicationManagerImpl::GetDeviceHandle(uint32_t connection_key) { - using namespace connection_handler; - uint32_t device_handle = 0; - connection_handler().GetDataOnSessionKey( - connection_key, 0, NULL, &device_handle); - return device_handle; -} - void ApplicationManagerImpl::SendPostMessageToMobile( const MessagePtr& message) { messages_to_mobile_.PostMessage(impl::MessageToMobile(message, false)); diff --git a/src/components/application_manager/src/commands/mobile/get_system_capability_request.cc b/src/components/application_manager/src/commands/mobile/get_system_capability_request.cc index 800e7fffe7..d19e2ecbb0 100644 --- a/src/components/application_manager/src/commands/mobile/get_system_capability_request.cc +++ b/src/components/application_manager/src/commands/mobile/get_system_capability_request.cc @@ -82,10 +82,9 @@ void GetSystemCapabilityRequest::Run() { case mobile_apis::SystemCapabilityType::AUDIO_STREAMING: SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE); return; - break; default: // Return unsupported resource SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE); - break; + return; } SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params); } diff --git a/src/components/application_manager/src/message.cc b/src/components/application_manager/src/message.cc index 537bd8f348..6a5336f222 100644 --- a/src/components/application_manager/src/message.cc +++ b/src/components/application_manager/src/message.cc @@ -107,16 +107,16 @@ bool Message::operator==(const Message& message) const { bool version = version_ == message.version_; bool data_size = data_size_ == message.data_size_; bool payload_size = payload_size_ == message.payload_size_; - bool binary_data = true; + bool binary_data_available = true; if (binary_data_) { - binary_data = std::equal(binary_data_->begin(), + binary_data_available = std::equal(binary_data_->begin(), binary_data_->end(), message.binary_data_->begin(), BinaryDataPredicate); } return function_id && correlation_id && connection_key && type && - binary_data && json_message && version && data_size && payload_size; + binary_data_available && json_message && version && data_size && payload_size; } Message::~Message() { diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h index 6659022ee5..d9e0b346d4 100644 --- a/src/components/include/application_manager/application_manager.h +++ b/src/components/include/application_manager/application_manager.h @@ -164,18 +164,6 @@ class ApplicationManager { virtual ApplicationSharedPtr application( const std::string& device_id, const std::string& policy_app_id) const = 0; - virtual uint32_t GetDeviceHandle(uint32_t connection_key) = 0; - - /** - * @brief Checks HMI level and returns true if audio streaming is allowed - */ - virtual bool IsAudioStreamingAllowed(uint32_t connection_key) const = 0; - - /** - * @brief Checks HMI level and returns true if video streaming is allowed - */ - virtual bool IsVideoStreamingAllowed(uint32_t connection_key) const = 0; - virtual void ChangeAppsHMILevel(uint32_t app_id, mobile_apis::HMILevel::eType level) = 0; diff --git a/src/components/include/test/application_manager/mock_application_manager.h b/src/components/include/test/application_manager/mock_application_manager.h index 4dde99dbfc..e94d9b4b3a 100644 --- a/src/components/include/test/application_manager/mock_application_manager.h +++ b/src/components/include/test/application_manager/mock_application_manager.h @@ -81,9 +81,6 @@ class MockApplicationManager : public application_manager::ApplicationManager { application_manager::ApplicationSharedPtr( const std::string& device_id, const std::string& policy_app_id)); - MOCK_METHOD1(GetDeviceHandle, uint32_t(uint32_t connection_key)); - MOCK_CONST_METHOD1(IsAudioStreamingAllowed, bool(uint32_t connection_key)); - MOCK_CONST_METHOD1(IsVideoStreamingAllowed, bool(uint32_t connection_key)); MOCK_METHOD2(ChangeAppsHMILevel, void(uint32_t app_id, mobile_apis::HMILevel::eType level)); MOCK_METHOD0(GetPluginManager, functional_modules::PluginManager&()); |