diff options
16 files changed, 81 insertions, 55 deletions
diff --git a/src/components/application_manager/include/application_manager/application.h b/src/components/application_manager/include/application_manager/application.h index a0abfb79d4..63d9580758 100644 --- a/src/components/application_manager/include/application_manager/application.h +++ b/src/components/application_manager/include/application_manager/application.h @@ -427,8 +427,8 @@ class Application : public virtual InitialApplicationData, virtual bool is_navi() const = 0; virtual void set_is_navi(bool allow) = 0; - virtual void SetMobileProjectionEnabled(bool option) = 0; - virtual bool MobileProjectionEnabled() const = 0; + virtual void set_mobile_projection_enabled(bool option) = 0; + virtual bool mobile_projection_enabled() const = 0; virtual bool video_streaming_approved() const = 0; virtual void set_video_streaming_approved(bool state) = 0; diff --git a/src/components/application_manager/include/application_manager/application_impl.h b/src/components/application_manager/include/application_manager/application_impl.h index 2d2994fe7d..695d7ef9d5 100644 --- a/src/components/application_manager/include/application_manager/application_impl.h +++ b/src/components/application_manager/include/application_manager/application_impl.h @@ -96,9 +96,9 @@ class ApplicationImpl : public virtual InitialApplicationDataImpl, } void set_is_navi(bool allow); - void SetMobileProjectionEnabled(bool option); + void set_mobile_projection_enabled(bool option); - bool MobileProjectionEnabled() const; + bool mobile_projection_enabled() const; bool video_streaming_approved() const; void set_video_streaming_approved(bool state); 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 596b9303f3..fcd9928280 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 @@ -243,12 +243,14 @@ class ApplicationManagerImpl std::vector<ApplicationSharedPtr> applications_by_button( uint32_t button) OVERRIDE; std::vector<ApplicationSharedPtr> applications_with_navi() OVERRIDE; - std::vector<ApplicationSharedPtr> applications_with_mobile_projection() OVERRIDE; + std::vector<ApplicationSharedPtr> applications_with_mobile_projection() + OVERRIDE; ApplicationSharedPtr get_limited_media_application() const OVERRIDE; ApplicationSharedPtr get_limited_navi_application() const OVERRIDE; ApplicationSharedPtr get_limited_voice_application() const OVERRIDE; - ApplicationSharedPtr get_limited_mobile_projection_application() const OVERRIDE; + ApplicationSharedPtr get_limited_mobile_projection_application() + const OVERRIDE; uint32_t application_id(const int32_t correlation_id) OVERRIDE; void set_application_id(const int32_t correlation_id, diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc index 7c5f7ed6fa..21039e1865 100644 --- a/src/components/application_manager/src/application_impl.cc +++ b/src/components/application_manager/src/application_impl.cc @@ -235,12 +235,12 @@ void ApplicationImpl::SetPostponedState(HmiStatePtr state) { state_.AddState(state); } -void ApplicationImpl::SetMobileProjectionEnabled(bool option) { +void ApplicationImpl::set_mobile_projection_enabled(bool option) { LOG4CXX_AUTO_TRACE(logger_); mobile_projection_enabled_ = option; } -bool ApplicationImpl::MobileProjectionEnabled() const { +bool ApplicationImpl::mobile_projection_enabled() const { return mobile_projection_enabled_; } @@ -505,7 +505,7 @@ void ApplicationImpl::WakeUpStreaming( protocol_handler::ServiceType service_type) { using namespace protocol_handler; LOG4CXX_AUTO_TRACE(logger_); - + if (ServiceType::kMobileNav == service_type) { sync_primitives::AutoLock lock(video_streaming_suspended_lock_); if (video_streaming_suspended_) { diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index c09ddffbb5..d8cf70da91 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -292,19 +292,20 @@ ApplicationManagerImpl::applications_with_navi() { return FindAllApps(accessor, NaviAppPredicate); } -bool LimitedMobileProjectionPredicate( const ApplicationSharedPtr app) { - return app ? (app->MobileProjectionEnabled() && - app->hmi_level() == mobile_api::HMILevel::HMI_LIMITED) : false; +bool LimitedMobileProjectionPredicate(const ApplicationSharedPtr app) { + return app ? (app->mobile_projection_enabled() && + app->hmi_level() == mobile_api::HMILevel::HMI_LIMITED) + : false; } -ApplicationSharedPtr ApplicationManagerImpl::get_limited_mobile_projection_application() - const { +ApplicationSharedPtr +ApplicationManagerImpl::get_limited_mobile_projection_application() const { DataAccessor<ApplicationSet> accessor = applications(); return FindApp(accessor, LimitedMobileProjectionPredicate); } bool MobileProjectionPredicate(const ApplicationSharedPtr app) { - return app ? app->MobileProjectionEnabled() : false; + return app ? app->mobile_projection_enabled() : false; } std::vector<ApplicationSharedPtr> @@ -375,7 +376,7 @@ bool ApplicationManagerImpl::IsAppTypeExistsInFullOrLimited( bool voice_state = app->is_voice_communication_supported(); bool media_state = app->is_media_application(); bool navi_state = app->is_navi(); - bool mobile_projection_state = app->MobileProjectionEnabled(); + bool mobile_projection_state = app->mobile_projection_enabled(); ApplicationSharedPtr active_app = active_application(); // Check app in FULL level if (active_app.valid()) { @@ -398,7 +399,7 @@ bool ApplicationManagerImpl::IsAppTypeExistsInFullOrLimited( return true; } - if (mobile_projection_state && active_app->MobileProjectionEnabled()) { + if (mobile_projection_state && active_app->mobile_projection_enabled()) { return true; } } @@ -427,8 +428,10 @@ bool ApplicationManagerImpl::IsAppTypeExistsInFullOrLimited( if (mobile_projection_state) { if (get_limited_mobile_projection_application().valid() && - (get_limited_mobile_projection_application()->app_id() != app->app_id())) + (get_limited_mobile_projection_application()->app_id() != + app->app_id())) { return true; + } } return false; @@ -1213,7 +1216,7 @@ bool ApplicationManagerImpl::OnServiceStartedCallback( if (Compare<ServiceType, EQ, ONE>( type, ServiceType::kMobileNav, ServiceType::kAudio)) { - if (app->is_navi() || app->MobileProjectionEnabled()) { + if (app->is_navi() || app->mobile_projection_enabled()) { return StartNaviService(session_key, type); } else { LOG4CXX_WARN(logger_, "Refuse not navi application"); @@ -2933,7 +2936,7 @@ void ApplicationManagerImpl::ForbidStreaming(uint32_t app_id) { LOG4CXX_AUTO_TRACE(logger_); ApplicationSharedPtr app = application(app_id); - if (!app || (!app->is_navi() && !app->MobileProjectionEnabled())) { + if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) { LOG4CXX_DEBUG(logger_, "There is no navi application with id: " << app_id); return; } @@ -2967,7 +2970,7 @@ void ApplicationManagerImpl::OnAppStreaming( LOG4CXX_AUTO_TRACE(logger_); ApplicationSharedPtr app = application(app_id); - if (!app || (!app->is_navi() && !app->MobileProjectionEnabled())) { + if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) { LOG4CXX_DEBUG(logger_, " There is no navi application with id: " << app_id); return; } @@ -2987,7 +2990,7 @@ void ApplicationManagerImpl::EndNaviServices(uint32_t app_id) { LOG4CXX_AUTO_TRACE(logger_); ApplicationSharedPtr app = application(app_id); - if (!app || (!app->is_navi() && !app->MobileProjectionEnabled())) { + if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) { LOG4CXX_DEBUG(logger_, "There is no navi application with id: " << app_id); return; } @@ -3038,7 +3041,7 @@ void ApplicationManagerImpl::OnHMILevelChanged( } ApplicationSharedPtr app = application(app_id); - if (!app || (!app->is_navi() && !app->MobileProjectionEnabled())) { + if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) { LOG4CXX_ERROR(logger_, "Navi application not found"); return; } @@ -3161,7 +3164,7 @@ void ApplicationManagerImpl::DisallowStreaming(uint32_t app_id) { LOG4CXX_AUTO_TRACE(logger_); ApplicationSharedPtr app = application(app_id); - if (!app || (!app->is_navi() && !app->MobileProjectionEnabled())) { + if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) { LOG4CXX_ERROR(logger_, "Navi application not found"); return; } @@ -3182,7 +3185,7 @@ void ApplicationManagerImpl::AllowStreaming(uint32_t app_id) { LOG4CXX_AUTO_TRACE(logger_); ApplicationSharedPtr app = application(app_id); - if (!app || (!app->is_navi() && !app->MobileProjectionEnabled())) { + if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) { LOG4CXX_ERROR(logger_, "Navi application not found"); return; } diff --git a/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc b/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc index 63d513bcaf..2a9969eac4 100644 --- a/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc +++ b/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc @@ -50,15 +50,16 @@ OnTouchEventNotification::~OnTouchEventNotification() {} void OnTouchEventNotification::Run() { LOG4CXX_AUTO_TRACE(logger_); - const std::vector<ApplicationSharedPtr>& applications = + const std::vector<ApplicationSharedPtr>& applications_with_navi = application_manager_.applications_with_navi(); const std::vector<ApplicationSharedPtr>& projection_applications = - application_manager_.applications_with_mobile_projection(); + application_manager_.applications_with_mobile_projection(); - std::vector<ApplicationSharedPtr>::const_iterator nav_it = applications.begin(); - - for (; applications.end() != nav_it; ++nav_it) { + std::vector<ApplicationSharedPtr>::const_iterator nav_it = + applications_with_navi.begin(); + + for (; applications_with_navi.end() != nav_it; ++nav_it) { ApplicationSharedPtr app = *nav_it; if (app->IsFullscreen()) { (*message_)[strings::params][strings::connection_key] = app->app_id(); @@ -66,13 +67,14 @@ void OnTouchEventNotification::Run() { } } - std::vector<ApplicationSharedPtr>::const_iterator projection_it = - projection_applications.begin(); + std::vector<ApplicationSharedPtr>::const_iterator projection_it = + projection_applications.begin(); for (; projection_applications.end() != projection_it; ++projection_it) { ApplicationSharedPtr projection_app = *projection_it; if (projection_app->IsFullscreen()) { - (*message_)[strings::params][strings::connection_key] = projection_app->app_id(); + (*message_)[strings::params][strings::connection_key] = + projection_app->app_id(); SendNotification(); } } diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc index 3be16ec78d..52153647a7 100644 --- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc @@ -325,7 +325,7 @@ void RegisterAppInterfaceRequest::Run() { if (mobile_apis::AppHMIType::PROJECTION == static_cast<mobile_apis::AppHMIType::eType>( app_type.getElement(i).asUInt())) { - application->SetMobileProjectionEnabled(true); + application->set_mobile_projection_enabled(true); } } } diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc index aad927cc6a..393a9d7784 100644 --- a/src/components/application_manager/src/hmi_state.cc +++ b/src/components/application_manager/src/hmi_state.cc @@ -77,7 +77,7 @@ bool HmiState::is_voice_communication_app(const uint32_t app_id) const { bool HmiState::is_mobile_projection_app(const uint32_t app_id) const { const ApplicationSharedPtr app = app_mngr_.application(app_id); - return app ? app->MobileProjectionEnabled() : false; + return app ? app->mobile_projection_enabled() : false; } mobile_apis::AudioStreamingState::eType VRHmiState::audio_streaming_state() diff --git a/src/components/application_manager/src/state_controller_impl.cc b/src/components/application_manager/src/state_controller_impl.cc index c9a80e8089..9d0abc339d 100644 --- a/src/components/application_manager/src/state_controller_impl.cc +++ b/src/components/application_manager/src/state_controller_impl.cc @@ -363,7 +363,7 @@ bool StateControllerImpl::IsResumptionAllowed(ApplicationSharedPtr app, } if (IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI) && - (app->is_navi() || app->MobileProjectionEnabled())) { + (app->is_navi() || app->mobile_projection_enabled())) { LOG4CXX_DEBUG(logger_, "Resumption for navi app is not allowed. " << "EMBEDDED_NAVI event is active"); @@ -560,13 +560,13 @@ bool StateControllerImpl::IsSameAppType(ApplicationConstSharedPtr app1, const bool both_navi = app1->is_navi() && app2->is_navi(); const bool both_vc = app1->is_voice_communication_supported() && - app2->is_voice_communication_supported(); + app2->is_voice_communication_supported(); const bool both_simple = !app1->IsAudioApplication() && !app2->IsAudioApplication(); - const bool both_projection = app1->MobileProjectionEnabled() && - app2->MobileProjectionEnabled(); + const bool both_projection = + app1->mobile_projection_enabled() && app2->mobile_projection_enabled(); return both_simple || both_media || both_navi || both_vc || both_projection; } diff --git a/src/components/application_manager/test/application_impl_test.cc b/src/components/application_manager/test/application_impl_test.cc index 6e98965e5c..8f00284772 100644 --- a/src/components/application_manager/test/application_impl_test.cc +++ b/src/components/application_manager/test/application_impl_test.cc @@ -569,14 +569,14 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeNotNaviNotVoice) { EXPECT_FALSE(app_impl->is_navi()); EXPECT_FALSE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); app_impl->set_app_types(type_media); app_impl->ChangeSupportingAppHMIType(); EXPECT_FALSE(app_impl->is_navi()); EXPECT_FALSE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); } TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsVoice) { @@ -585,14 +585,14 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsVoice) { EXPECT_FALSE(app_impl->is_navi()); EXPECT_FALSE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); app_impl->set_app_types(type_comm); app_impl->ChangeSupportingAppHMIType(); EXPECT_FALSE(app_impl->is_navi()); EXPECT_TRUE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); } TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNavi) { @@ -601,14 +601,14 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNavi) { EXPECT_FALSE(app_impl->is_navi()); EXPECT_FALSE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); app_impl->set_app_types(type_navi); app_impl->ChangeSupportingAppHMIType(); EXPECT_TRUE(app_impl->is_navi()); EXPECT_FALSE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); } TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNaviAndVoice) { @@ -619,17 +619,18 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNaviAndVoice) { EXPECT_FALSE(app_impl->is_navi()); EXPECT_FALSE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); app_impl->set_app_types(app_types); app_impl->ChangeSupportingAppHMIType(); EXPECT_TRUE(app_impl->is_navi()); EXPECT_TRUE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); } -TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNaviAndVoiceAndProjection) { +TEST_F(ApplicationImplTest, + ChangeSupportingAppHMIType_TypeIsNaviAndVoiceAndProjection) { smart_objects::SmartObject app_types; app_types[0] = AppHMIType::NAVIGATION; app_types[1] = AppHMIType::COMMUNICATION; @@ -638,14 +639,14 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNaviAndVoiceAndProj EXPECT_FALSE(app_impl->is_navi()); EXPECT_FALSE(app_impl->is_voice_communication_supported()); - EXPECT_FALSE(app_impl->MobileProjectionEnabled()); + EXPECT_FALSE(app_impl->mobile_projection_enabled()); app_impl->set_app_types(app_types); app_impl->ChangeSupportingAppHMIType(); EXPECT_TRUE(app_impl->is_navi()); EXPECT_TRUE(app_impl->is_voice_communication_supported()); - EXPECT_TRUE(app_impl->MobileProjectionEnabled()); + EXPECT_TRUE(app_impl->mobile_projection_enabled()); } TEST_F(ApplicationImplTest, UpdateHash_AppMngrNotSuspended) { diff --git a/src/components/application_manager/test/include/application_manager/mock_application.h b/src/components/application_manager/test/include/application_manager/mock_application.h index b56175d44b..3276e1f8f5 100644 --- a/src/components/application_manager/test/include/application_manager/mock_application.h +++ b/src/components/application_manager/test/include/application_manager/mock_application.h @@ -59,8 +59,8 @@ class MockApplication : public ::application_manager::Application { MOCK_METHOD0(ChangeSupportingAppHMIType, void()); MOCK_CONST_METHOD0(is_navi, bool()); MOCK_METHOD1(set_is_navi, void(bool allow)); - MOCK_CONST_METHOD0(MobileProjectionEnabled, bool()); - MOCK_METHOD1(SetMobileProjectionEnabled, void(bool allow)); + MOCK_CONST_METHOD0(mobile_projection_enabled, bool()); + MOCK_METHOD1(set_mobile_projection_enabled, void(bool allow)); MOCK_CONST_METHOD0(video_streaming_approved, bool()); MOCK_METHOD1(set_video_streaming_approved, void(bool state)); MOCK_CONST_METHOD0(audio_streaming_approved, bool()); diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h index 7b4f55b17f..98bb341657 100644 --- a/src/components/include/application_manager/application_manager.h +++ b/src/components/include/application_manager/application_manager.h @@ -157,7 +157,8 @@ class ApplicationManager { uint32_t button) = 0; virtual std::vector<ApplicationSharedPtr> applications_with_navi() = 0; - virtual std::vector<ApplicationSharedPtr> applications_with_mobile_projection() = 0; + virtual std::vector<ApplicationSharedPtr> + applications_with_mobile_projection() = 0; /** * @brief Returns media application with LIMITED HMI Level if exists * @@ -183,7 +184,8 @@ class ApplicationManager { */ virtual ApplicationSharedPtr get_limited_voice_application() const = 0; - virtual ApplicationSharedPtr get_limited_mobile_projection_application() const = 0; + virtual ApplicationSharedPtr get_limited_mobile_projection_application() + const = 0; /** * @brief Retrieves application id associated with correlation id diff --git a/src/components/policy/policy_external/include/policy/policy_table/enums.h b/src/components/policy/policy_external/include/policy/policy_table/enums.h index 45fad03dae..4b0a7d74bc 100644 --- a/src/components/policy/policy_external/include/policy/policy_table/enums.h +++ b/src/components/policy/policy_external/include/policy/policy_table/enums.h @@ -119,7 +119,8 @@ enum AppHMIType { AHT_SOCIAL, AHT_BACKGROUND_PROCESS, AHT_TESTING, - AHT_SYSTEM + AHT_SYSTEM, + AHT_PROJECTION }; bool IsValidEnum(AppHMIType val); const char* EnumToJsonString(AppHMIType val); diff --git a/src/components/policy/policy_external/src/policy_table/enums.cc b/src/components/policy/policy_external/src/policy_table/enums.cc index e70167c94b..45db2cb469 100644 --- a/src/components/policy/policy_external/src/policy_table/enums.cc +++ b/src/components/policy/policy_external/src/policy_table/enums.cc @@ -438,6 +438,8 @@ bool IsValidEnum(AppHMIType val) { return true; case AHT_SYSTEM: return true; + case AHT_PROJECTION: + return true; default: return false; } @@ -464,6 +466,8 @@ const char* EnumToJsonString(AppHMIType val) { return "TESTING"; case AHT_SYSTEM: return "SYSTEM"; + case AHT_PROJECTION: + return "PROJECTION"; default: return ""; } @@ -499,6 +503,9 @@ bool EnumFromJsonString(const std::string& literal, AppHMIType* result) { } else if ("SYSTEM" == literal) { *result = AHT_SYSTEM; return true; + } else if ("PROJECTION" == literal) { + *result = AHT_PROJECTION; + return true; } else { return false; } diff --git a/src/components/policy/policy_regular/include/policy/policy_table/enums.h b/src/components/policy/policy_regular/include/policy/policy_table/enums.h index 0554e94722..876ca03a27 100644 --- a/src/components/policy/policy_regular/include/policy/policy_table/enums.h +++ b/src/components/policy/policy_regular/include/policy/policy_table/enums.h @@ -105,6 +105,7 @@ enum AppHMIType { AHT_TESTING, AHT_SYSTEM, AHT_REMOTE_CONTROL, + AHT_PROJECTION }; bool IsValidEnum(AppHMIType val); const char* EnumToJsonString(AppHMIType val); diff --git a/src/components/policy/policy_regular/src/policy_table/enums.cc b/src/components/policy/policy_regular/src/policy_table/enums.cc index 26c7b96b32..6de065148a 100644 --- a/src/components/policy/policy_regular/src/policy_table/enums.cc +++ b/src/components/policy/policy_regular/src/policy_table/enums.cc @@ -324,6 +324,8 @@ bool IsValidEnum(AppHMIType val) { return true; case AHT_SYSTEM: return true; + case AHT_PROJECTION: + return true; default: return false; } @@ -350,6 +352,8 @@ const char* EnumToJsonString(AppHMIType val) { return "TESTING"; case AHT_SYSTEM: return "SYSTEM"; + case AHT_PROJECTION: + return "PROJECTION"; default: return ""; } @@ -385,6 +389,9 @@ bool EnumFromJsonString(const std::string& literal, AppHMIType* result) { } else if ("SYSTEM" == literal) { *result = AHT_SYSTEM; return true; + } else if ("PROJECTION" == literal) { + *result = AHT_PROJECTION; + return true; } else { return false; } |