summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CONTRIBUTING.md1
-rw-r--r--README.md1
-rw-r--r--src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h12
-rw-r--r--src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h12
-rw-r--r--src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h12
-rwxr-xr-xsrc/appMain/hmi_capabilities.json15
-rw-r--r--src/appMain/sdl_preloaded_pt.json96
-rw-r--r--src/components/application_manager/include/application_manager/application.h19
-rw-r--r--src/components/application_manager/include/application_manager/application_impl.h6
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h9
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resumption_data_db.h32
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h4
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h50
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc45
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc60
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc1
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc19
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc52
-rw-r--r--src/components/application_manager/src/application_impl.cc100
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc132
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc131
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_db.cc138
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_json.cc4
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_processor_impl.cc4
-rw-r--r--src/components/application_manager/src/resumption/resumption_sql_queries.cc44
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc3
-rwxr-xr-xsrc/components/application_manager/test/CMakeLists.txt2
-rw-r--r--src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc30
-rw-r--r--src/components/application_manager/test/application_impl_test.cc13
-rw-r--r--src/components/application_manager/test/application_manager_impl_test.cc52
-rw-r--r--src/components/application_manager/test/hmi_capabilities_test.cc1
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_application.h7
-rw-r--r--src/components/application_manager/test/include/application_manager/resumption_data_test.h1
-rw-r--r--src/components/application_manager/test/message_helper/message_helper_test.cc55
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc101
-rw-r--r--src/components/application_manager/test/request_controller/request_controller_test.cc18
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_test.cc2
-rw-r--r--src/components/application_manager/test/resumption_sql_queries_test.cc2
-rw-r--r--src/components/application_manager/test/rpc_passing_handler_test.cc2
-rw-r--r--src/components/application_manager/test/sdl_preloaded_pt.json1979
-rw-r--r--src/components/connection_handler/test/connection_handler_impl_test.cc66
-rw-r--r--src/components/connection_handler/test/heart_beat_monitor_test.cc36
-rw-r--r--src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc6
-rw-r--r--src/components/include/application_manager/application_manager.h8
-rw-r--r--src/components/include/test/application_manager/mock_application_manager.h3
-rw-r--r--src/components/include/test/utils/test_async_waiter.h14
-rw-r--r--src/components/interfaces/HMI_API.xml95
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml2
-rw-r--r--src/components/policy/policy_external/test/update_status_manager_test.cc54
-rw-r--r--src/components/protocol_handler/test/protocol_handler_tm_test.cc353
-rw-r--r--src/components/security_manager/src/crypto_manager_impl.cc21
-rw-r--r--src/components/security_manager/test/security_manager_test.cc102
-rw-r--r--src/components/security_manager/test/ssl_certificate_handshake_test.cc2
-rw-r--r--src/components/security_manager/test/ssl_context_test.cc266
-rw-r--r--src/components/transport_manager/src/tcp/tcp_client_listener.cc2
-rw-r--r--src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc6
-rw-r--r--src/components/transport_manager/test/tcp_client_listener_test.cc6
-rw-r--r--src/components/transport_manager/test/transport_manager_impl_test.cc56
-rw-r--r--tools/InterfaceGenerator/generator/generators/PolicyTypes.py10
-rwxr-xr-xtools/InterfaceGenerator/generator/generators/SmartFactoryBase.py14
-rw-r--r--tools/intergen/test/test_hmi_interface.xml6
m---------tools/rpc_spec0
71 files changed, 1267 insertions, 3175 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 1da30fbf62..bc90d907c1 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -6,6 +6,7 @@ Third party contributions are essential for making SDL great. However, we do hav
Currently supported:
* Ubuntu Linux 16.04 with GCC 5.4.x
* Ubuntu Linux 18.04 with GCC 7.3.x
+* Ubuntu Linux 20.04 with GCC 9.3.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)
### Issues
diff --git a/README.md b/README.md
index 0046a0f679..3bc7781268 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ Pull Requests Welcome!
Currently supported:
* Ubuntu Linux 16.04 with GCC 5.4.x
* Ubuntu Linux 18.04 with GCC 7.5.x
+* Ubuntu Linux 20.04 with GCC 9.3.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)
## Getting Started
diff --git a/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h b/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h
index 93359b6164..5f6ce8dbc7 100644
--- a/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h
+++ b/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h
@@ -1823,16 +1823,16 @@ using ::std::tuple_size;
# define GTEST_ATTRIBUTE_UNUSED_
#endif
-// A macro to disallow operator=
+// A macro to disallow copy operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
+#define GTEST_DISALLOW_ASSIGN_(type) \
+ type& operator=(type const &) = delete
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
+#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
+ type(type const&) = delete; \
+ type& operator=(type const&) = delete
// Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations
diff --git a/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h b/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h
index 93359b6164..5f6ce8dbc7 100644
--- a/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h
+++ b/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h
@@ -1823,16 +1823,16 @@ using ::std::tuple_size;
# define GTEST_ATTRIBUTE_UNUSED_
#endif
-// A macro to disallow operator=
+// A macro to disallow copy operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
+#define GTEST_DISALLOW_ASSIGN_(type) \
+ type& operator=(type const &) = delete
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
+#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
+ type(type const&) = delete; \
+ type& operator=(type const&) = delete
// Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations
diff --git a/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h b/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h
index 280935daca..307a65d592 100644
--- a/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h
+++ b/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h
@@ -716,16 +716,16 @@ using ::std::tuple_size;
# define GTEST_ATTRIBUTE_UNUSED_
#endif
-// A macro to disallow operator=
+// A macro to disallow copy operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
+#define GTEST_DISALLOW_ASSIGN_(type) \
+ type& operator=(type const &) = delete
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
+#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
+ type(type const&) = delete; \
+ type& operator=(type const&) = delete
// Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index 1e1c5aea79..a3e8155f44 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -105,12 +105,6 @@
"rows": 1
},
{
- "name": "navigationText",
- "characterSet": "UTF_8",
- "width": 500,
- "rows": 1
- },
- {
"name": "audioPassThruDisplayText1",
"characterSet": "UTF_8",
"width": 500,
@@ -135,12 +129,6 @@
"rows": 1
},
{
- "name": "notificationText",
- "characterSet": "UTF_8",
- "width": 500,
- "rows": 1
- },
- {
"name": "menuName",
"characterSet": "UTF_8",
"width": 500,
@@ -323,7 +311,8 @@
"hapticSpatialDataSupported": false,
"diagonalScreenSize": 8,
"pixelPerInch": 117,
- "scale": 1
+ "scale": 1,
+ "preferredFPS": 15
},
"driverDistractionCapability": {
"menuLength": 10,
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index 7561d4e629..1debd2918d 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -545,6 +545,7 @@
"rpm",
"steeringWheelAngle",
"gearStatus",
+ "seatOccupancy",
"handsOffSteering"
]
},
@@ -564,6 +565,7 @@
"rpm",
"steeringWheelAngle",
"gearStatus",
+ "seatOccupancy",
"handsOffSteering"
]
},
@@ -583,6 +585,7 @@
"rpm",
"steeringWheelAngle",
"gearStatus",
+ "seatOccupancy",
"handsOffSteering"
]
},
@@ -602,6 +605,7 @@
"rpm",
"steeringWheelAngle",
"gearStatus",
+ "seatOccupancy",
"handsOffSteering"
]
}
@@ -621,6 +625,7 @@
"deviceStatus",
"engineOilLife",
"engineTorque",
+ "climateData",
"externalTemperature",
"turnSignal",
"fuelLevel",
@@ -648,6 +653,7 @@
"deviceStatus",
"engineOilLife",
"engineTorque",
+ "climateData",
"externalTemperature",
"turnSignal",
"fuelLevel",
@@ -675,6 +681,7 @@
"deviceStatus",
"engineOilLife",
"engineTorque",
+ "climateData",
"externalTemperature",
"turnSignal",
"fuelLevel",
@@ -701,6 +708,7 @@
"deviceStatus",
"engineOilLife",
"engineTorque",
+ "climateData",
"externalTemperature",
"turnSignal",
"fuelLevel",
@@ -3476,12 +3484,71 @@
"since": "5.0"
},
{
+ "name": "climateData",
+ "params": [
+ {
+ "name": "externalTemperature",
+ "key": "OEM_REF_EXT_TEMP",
+ "params": [
+ {
+ "name": "unit",
+ "key": "OEM_REF_EXT_TEMP_UNIT",
+ "type": "TemperatureUnit",
+ "mandatory": true
+ },
+ {
+ "name": "value",
+ "key": "OEM_REF_EXT_TEMP_VALUE",
+ "type": "Float",
+ "mandatory": true
+ }
+ ],
+ "type": "Struct",
+ "mandatory": false
+ },
+ {
+ "name": "cabinTemperature",
+ "key": "OEM_REF_CABIN_TEMP",
+ "params": [
+ {
+ "name": "unit",
+ "key": "OEM_REF_CABIN_TEMP_VALUE",
+ "type": "TemperatureUnit",
+ "mandatory": true
+ },
+ {
+ "name": "value",
+ "key": "OEM_REF_CABIN_TEMP_VALUE",
+ "type": "Float",
+ "mandatory": true
+ }
+ ],
+ "type": "Struct",
+ "mandatory": false
+ },
+ {
+ "name": "atmosphericPressure",
+ "key": "OEM_REF_ATMOSPHERIC_PRESSURE",
+ "type": "Float",
+ "minvalue": 0,
+ "maxvalue": 2000,
+ "mandatory": false
+ }
+ ],
+ "key": "OEM_REF_CLIMATE_DATA",
+ "type": "Struct",
+ "mandatory": false,
+ "since": "7.1"
+ },
+ {
"name": "externalTemperature",
"key": "OEM_REF_EXT_TEMP",
"type": "Float",
"mandatory": false,
"minvalue": -40,
- "maxvalue": 100
+ "maxvalue": 100,
+ "deprecated": true,
+ "since": "7.1"
},
{
"name": "turnSignal",
@@ -4372,6 +4439,33 @@
"type": "Boolean",
"mandatory": false,
"since": "7.0"
+ },
+ {
+ "name": "seatOccupancy",
+ "key": "OEM_REF_SEAT_OCCUP",
+ "params": [
+ {
+ "name": "seatsOccupied",
+ "key": "OEM_REF_SEATS_OCCUP",
+ "type": "SeatStatus",
+ "array": true,
+ "minsize": 0,
+ "maxsize": 100,
+ "mandatory": false
+ },
+ {
+ "name": "seatsBelted",
+ "key": "OEM_REF_SEATS_BELT",
+ "type": "SeatStatus",
+ "array": true,
+ "minsize": 0,
+ "maxsize": 100,
+ "mandatory": false
+ }
+ ],
+ "type": "Struct",
+ "mandatory": false,
+ "since": "7.1"
}
]
}
diff --git a/src/components/application_manager/include/application_manager/application.h b/src/components/application_manager/include/application_manager/application.h
index c08bb37082..4a3dc473ed 100644
--- a/src/components/application_manager/include/application_manager/application.h
+++ b/src/components/application_manager/include/application_manager/application.h
@@ -170,9 +170,14 @@ typedef std::map<uint32_t, smart_objects::SmartObject*> PerformChoice;
typedef std::map<uint32_t, PerformChoice> PerformChoiceSetMap;
/**
- * @brief Defines id of SoftButton
+ * @brief Defines id of SoftButtons for specified WindowID
*/
-typedef std::set<std::pair<uint32_t, WindowID> > SoftButtonID;
+typedef std::pair<WindowID, std::set<uint32_t> > WindowSoftButtons;
+
+/**
+ * @brief Defines id of SoftButtons related to a specified WindowID
+ */
+typedef std::set<WindowSoftButtons> SoftButtonIDs;
/**
* @brief Defines set of buttons subscription
@@ -369,8 +374,8 @@ class DynamicApplicationData {
/*
* @brief Returns true if sub menu with such name already exist
*/
- virtual bool IsSubMenuNameAlreadyExist(const std::string& name,
- const uint32_t parent_id) = 0;
+ DEPRECATED virtual bool IsSubMenuNameAlreadyExist(
+ const std::string& name, const uint32_t parent_id) = 0;
/*
* @brief Adds a interaction choice set to the application
@@ -961,10 +966,10 @@ class Application : public virtual InitialApplicationData,
* Alert, Show, ScrollableMessage, ShowConstantTBT, AlertManeuver,
* UpdateTurnList
* @param cmd_id Unique command id from mobile API
- * @param list of softbuttons were created by command.
+ * @param window_softbuttons list of softbuttons were created by command.
*/
- virtual void SubscribeToSoftButtons(int32_t cmd_id,
- const SoftButtonID& softbuttons_id) = 0;
+ virtual void SubscribeToSoftButtons(
+ int32_t cmd_id, const WindowSoftButtons& window_softbuttons) = 0;
/**
* @brief Retreives window id on which given button is created
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 88668a2505..6d60699a4e 100644
--- a/src/components/application_manager/include/application_manager/application_impl.h
+++ b/src/components/application_manager/include/application_manager/application_impl.h
@@ -279,8 +279,8 @@ class ApplicationImpl : public virtual Application,
bool AreCommandLimitsExceeded(mobile_apis::FunctionID::eType cmd_id,
TLimitSource source);
- virtual void SubscribeToSoftButtons(int32_t cmd_id,
- const SoftButtonID& softbuttons_id);
+ virtual void SubscribeToSoftButtons(
+ int32_t cmd_id, const WindowSoftButtons& window_softbuttons);
virtual bool IsSubscribedToSoftButton(const uint32_t softbutton_id);
virtual void UnsubscribeFromSoftButtons(int32_t cmd_id);
@@ -638,7 +638,7 @@ class ApplicationImpl : public virtual Application,
/**
* @brief Defines id of SoftButton which is related from name of command
*/
- typedef std::map<int32_t, SoftButtonID> CommandSoftButtonID;
+ typedef std::map<int32_t, SoftButtonIDs> CommandSoftButtonID;
CommandNumberTimeLimit cmd_number_to_time_limits_;
CommandSoftButtonID cmd_softbuttonid_;
// Lock for command soft button id
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 af2b44180c..f4728eefef 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
@@ -1177,6 +1177,9 @@ class ApplicationManagerImpl
bool IsSOStructValid(const hmi_apis::StructIdentifiers::eType struct_id,
const smart_objects::SmartObject& display_capabilities);
+ virtual bool UnsubscribeAppFromSoftButtons(
+ const commands::MessageSharedPtr response) OVERRIDE;
+
/**
* @brief Function returns supported SDL Protocol Version
* @return protocol version depends on parameters from smartDeviceLink.ini.
@@ -1622,9 +1625,9 @@ class ApplicationManagerImpl
ns_smart_device_link_rpc::V1::v4_protocol_v1_2_no_extra
mobile_v4_protocol_so_factory_;
- static uint32_t mobile_corelation_id_;
- static uint32_t corelation_id_;
- static const uint32_t max_corelation_id_;
+ std::atomic_uint32_t mobile_correlation_id_;
+ std::atomic_uint32_t correlation_id_;
+ const uint32_t max_correlation_id_;
std::unique_ptr<HMICapabilities> hmi_capabilities_;
// The reason of HU shutdown
diff --git a/src/components/application_manager/include/application_manager/resumption/resumption_data_db.h b/src/components/application_manager/include/application_manager/resumption/resumption_data_db.h
index a667dbf8e2..a4614d4f2c 100644
--- a/src/components/application_manager/include/application_manager/resumption/resumption_data_db.h
+++ b/src/components/application_manager/include/application_manager/resumption/resumption_data_db.h
@@ -353,6 +353,16 @@ class ResumptionDataDB : public ResumptionData {
const std::string& device_id);
/**
+ * @brief Deletes userLocation from saved application
+ * @param policy_app_id - mobile application id
+ * @param device_id - contains id of device on which is running application
+ * @return true if data was deleted otherwise returns
+ * false
+ */
+ bool DeleteUserLocation(const std::string& policy_app_id,
+ const std::string& device_id);
+
+ /**
* @brief Deletes commands from saved application
* @param policy_app_id - mobile application id
* @param device_id - contains id of device on which is running application
@@ -442,6 +452,16 @@ class ResumptionDataDB : public ResumptionData {
int64_t application_primary_key) const;
/**
+ * @brief Saves user location data to DB
+ * @param user_location contains data for saving
+ * @param application_primary_key - primary key from DB table application
+ * @return true if data was saved successfully otherwise returns
+ * false
+ */
+ bool InsertUserLocationData(const smart_objects::SmartObject& user_location,
+ int64_t application_primary_key) const;
+
+ /**
* @brief Saves globalProperties data to DB
* @param global_properties contains data for saving
* @param global_properties_key - will contain primary key from global
@@ -690,6 +710,18 @@ class ResumptionDataDB : public ResumptionData {
smart_objects::SmartObject& saved_app) const;
/**
+ * @brief Selects data from applicationUserLocation table
+ * @param policy_app_id contains mobile application id of application
+ * @param device_id contains id of device on which is running application
+ * @param saved_app contains userLocation
+ * @return true if query has been executed successfully otherwise returns
+ * false
+ */
+ bool SelectUserLocationData(const std::string& policy_app_id,
+ const std::string& device_id,
+ smart_objects::SmartObject& saved_app) const;
+
+ /**
* @brief Selects choice set data from DB
* @param policy_app_id contains mobile application id of application
* @param device_id contains id of device on which is running application
diff --git a/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h b/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h
index eee7650697..c62d115448 100644
--- a/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h
+++ b/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h
@@ -66,6 +66,7 @@ extern const std::string kDeleteApplicationFilesArray;
extern const std::string kDeleteSubMenu;
extern const std::string kDeleteApplicationSubMenuArray;
extern const std::string kDeleteApplicationSubscriptionsArray;
+extern const std::string kDeleteApplicationUserLocation;
extern const std::string kDeleteImageFromCommands;
extern const std::string kDeleteVrCommands;
extern const std::string kDeleteCommands;
@@ -97,6 +98,7 @@ extern const std::string kInsertToCommand;
extern const std::string kInsertApplicationCommandArray;
extern const std::string kInsertVrCommand;
extern const std::string kInsertSubscriptions;
+extern const std::string kInsertUserLocation;
extern const std::string kInsertChoice;
extern const std::string kInsertApplicationChoiceSet;
extern const std::string kInsertChoiceArray;
@@ -117,6 +119,8 @@ extern const std::string kSelectCountCommands;
extern const std::string kSelectCommands;
extern const std::string kSelectCountSubscriptions;
extern const std::string kSelectSubscriptions;
+extern const std::string kSelectCountUserLocation;
+extern const std::string kSelectUserLocation;
extern const std::string kSelectCountChoiceSet;
extern const std::string kSelectChoiceSets;
extern const std::string kSelectImage;
diff --git a/src/components/application_manager/include/application_manager/smart_object_keys.h b/src/components/application_manager/include/application_manager/smart_object_keys.h
index 89adc40894..932c65ae2d 100644
--- a/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ b/src/components/application_manager/include/application_manager/smart_object_keys.h
@@ -299,6 +299,7 @@ extern const char* fuel_level_state;
extern const char* instant_fuel_consumption;
extern const char* fuel_range;
extern const char* cloud_app_vehicle_id;
+extern const char* climate_data;
extern const char* external_temp;
extern const char* turn_signal;
extern const char* vin;
@@ -345,6 +346,7 @@ extern const char* engine_oil_life;
extern const char* oem_custom_data_type;
extern const char* window_status;
extern const char* hands_off_steering;
+extern const char* seat_occupancy;
// app services
extern const char* app_service_manifest;
@@ -488,6 +490,7 @@ extern const char* const haptic_rect_data;
extern const char* const rect;
extern const char* const x;
extern const char* const y;
+extern const char* const preferred_fps;
} // namespace strings
namespace hmi_interface {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h
index 8cac0d686d..6ccd57947c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/add_command_request.h
@@ -91,16 +91,6 @@ class AddCommandRequest : public app_mngr::commands::CommandRequestImpl {
private:
/*
- * @brief Check if command name doesn't exist in application
- * Please see SDLAQ-CRS-407 for more information
- *
- * @param app Mobile application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckCommandName(app_mngr::ApplicationConstSharedPtr app);
-
- /*
* @brief Check if command VR synonyms doesn't exist in application commands
* Please see SDLAQ-CRS-407 for more information
*
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
index a1bc866347..aba2ce3be5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
@@ -162,56 +162,6 @@ class CreateInteractionChoiceSetRequest
app_mngr::ApplicationConstSharedPtr app);
/*
- * @brief Predicate for using with CheckChoiceSet method to compare choice ID
- *param
- *
- * return TRUE if there is coincidence of choice ID, otherwise FALSE
- */
- struct CoincidencePredicateChoiceID {
- CoincidencePredicateChoiceID(const uint32_t newItem) : newItem_(newItem) {}
-
- bool operator()(smart_objects::SmartObject obj) {
- return obj[app_mngr::strings::choice_id].asUInt() == newItem_;
- }
-
- const uint32_t newItem_;
- };
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare menu name
- *param
- *
- * return TRUE if there is coincidence of menu name, otherwise FALSE
- */
- struct CoincidencePredicateMenuName {
- CoincidencePredicateMenuName(const std::string& newItem)
- : newItem_(newItem) {}
-
- bool operator()(smart_objects::SmartObject obj) {
- return obj[app_mngr::strings::menu_name].asString() == newItem_;
- }
-
- const std::string& newItem_;
- };
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare VR
- *commands param
- *
- * return TRUE if there is coincidence of VR commands, otherwise FALSE
- */
- struct CoincidencePredicateVRCommands {
- CoincidencePredicateVRCommands(const smart_objects::SmartObject& newItem)
- : newItem_(newItem) {}
-
- bool operator()(smart_objects::SmartObject obj) {
- return compareStr(obj, newItem_);
- }
-
- const smart_objects::SmartObject& newItem_;
- };
-
- /*
* @brief Checks if incoming choice set doesn't has similar VR synonyms.
*
* @param choice1 Choice to compare
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
index 9d14b248b6..88182a0b8e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
@@ -162,16 +162,6 @@ class PerformInteractionRequest
void SendUIShowVRHelpRequest(app_mngr::ApplicationSharedPtr const app);
/*
- * @brief Checks if incoming choice set doesn't has similar menu names.
- *
- * @param app_id Application ID
- *
- * return Return TRUE if there are no similar menu names in choice set,
- * otherwise FALSE
- */
- bool CheckChoiceSetMenuNames(app_mngr::ApplicationSharedPtr const app);
-
- /*
* @brief Checks if incoming choice set doesn't has similar VR synonyms.
*
* @param app_id Application ID
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc
index 6717f332f8..7460197904 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc
@@ -127,10 +127,6 @@ void AddCommandRequest::Run() {
bool data_exist = false;
if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
- if (!CheckCommandName(app)) {
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
if (((*message_)[strings::msg_params][strings::menu_params].keyExists(
hmi_request::parent_id)) &&
(0 != (*message_)[strings::msg_params][strings::menu_params]
@@ -220,47 +216,6 @@ void AddCommandRequest::Run() {
}
}
-bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
- if (!app) {
- return false;
- }
-
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
- CommandsMap::const_iterator i = commands.begin();
- uint32_t saved_parent_id = 0;
- uint32_t parent_id = 0;
- if ((*message_)[strings::msg_params][strings::menu_params].keyExists(
- hmi_request::parent_id)) {
- parent_id = (*message_)[strings::msg_params][strings::menu_params]
- [hmi_request::parent_id]
- .asUInt();
- }
-
- for (; commands.end() != i; ++i) {
- if (!(*i->second).keyExists(strings::menu_params)) {
- continue;
- }
-
- saved_parent_id = 0;
- if ((*i->second)[strings::menu_params].keyExists(hmi_request::parent_id)) {
- saved_parent_id =
- (*i->second)[strings::menu_params][hmi_request::parent_id].asUInt();
- }
- if (((*i->second)[strings::menu_params][strings::menu_name].asString() ==
- (*message_)[strings::msg_params][strings::menu_params]
- [strings::menu_name]
- .asString()) &&
- (saved_parent_id == parent_id)) {
- SDL_LOG_INFO(
- "AddCommandRequest::CheckCommandName received"
- " command name already exist in same level menu");
- return false;
- }
- }
- return true;
-}
-
bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
if (!app) {
return false;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc
index e2a37f17bd..efc1a6ee18 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc
@@ -114,12 +114,6 @@ void AddSubMenuRequest::Run() {
const std::string& menu_name =
received_msg_params[strings::menu_name].asString();
- if (app->IsSubMenuNameAlreadyExist(menu_name, parent_id)) {
- SDL_LOG_ERROR("Menu name " << menu_name << " is duplicated.");
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
-
if (!CheckSubMenuName()) {
SDL_LOG_ERROR("Sub-menu name is not valid.");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc
index 993dc75548..5661b1df9c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc
@@ -59,6 +59,8 @@ AlertManeuverResponse::~AlertManeuverResponse() {}
void AlertManeuverResponse::Run() {
SDL_LOG_AUTO_TRACE();
+ application_manager_.UnsubscribeAppFromSoftButtons(message_);
+
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc
index 1b8eebe7d7..84d23bec46 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc
@@ -61,6 +61,8 @@ AlertResponse::~AlertResponse() {}
void AlertResponse::Run() {
SDL_LOG_AUTO_TRACE();
+ application_manager_.UnsubscribeAppFromSoftButtons(message_);
+
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc
index 5d3b203afe..5bd3ce697e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc
@@ -195,8 +195,7 @@ void PerformInteractionRequest::Run() {
switch (interaction_mode_) {
case mobile_apis::InteractionMode::BOTH: {
SDL_LOG_DEBUG("Interaction Mode: BOTH");
- if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
- !CheckVrHelpItemPositions(app) ||
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app) ||
!CheckChoiceSetListVRCommands(app)) {
return;
}
@@ -204,8 +203,7 @@ void PerformInteractionRequest::Run() {
}
case mobile_apis::InteractionMode::MANUAL_ONLY: {
SDL_LOG_DEBUG("Interaction Mode: MANUAL_ONLY");
- if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
- !CheckVrHelpItemPositions(app)) {
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app)) {
return;
}
break;
@@ -683,60 +681,6 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
hmi_apis::FunctionID::VR_PerformInteraction, &msg_params, true);
}
-bool PerformInteractionRequest::CheckChoiceSetMenuNames(
- application_manager::ApplicationSharedPtr const app) {
- SDL_LOG_AUTO_TRACE();
-
- smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- for (size_t i = 0; i < choice_list.length(); ++i) {
- // choice_set contains SmartObject msg_params
- smart_objects::SmartObject i_choice_set =
- app->FindChoiceSet(choice_list[i].asInt());
-
- for (size_t j = 0; j < choice_list.length(); ++j) {
- smart_objects::SmartObject j_choice_set =
- app->FindChoiceSet(choice_list[j].asInt());
-
- if (i == j) {
- // skip check the same element
- continue;
- }
-
- if ((smart_objects::SmartType_Null == i_choice_set.getType()) ||
- (smart_objects::SmartType_Null == j_choice_set.getType())) {
- SDL_LOG_ERROR("Invalid ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return false;
- }
-
- size_t ii = 0;
- size_t jj = 0;
- for (; ii < i_choice_set[strings::choice_set].length(); ++ii) {
- for (; jj < j_choice_set[strings::choice_set].length(); ++jj) {
- const std::string& ii_menu_name =
- i_choice_set[strings::choice_set][ii][strings::menu_name]
- .asString();
- const std::string& jj_menu_name =
- j_choice_set[strings::choice_set][jj][strings::menu_name]
- .asString();
-
- if (ii_menu_name == jj_menu_name) {
- SDL_LOG_ERROR("Choice set has duplicated menu name");
- SendResponse(false,
- mobile_apis::Result::DUPLICATE_NAME,
- "Choice set has duplicated menu name");
- return false;
- }
- }
- }
- }
- }
-
- return true;
-}
-
bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
application_manager::ApplicationSharedPtr const app) {
SDL_LOG_AUTO_TRACE();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc
index a6f980b9ba..b7cf0e15ac 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc
@@ -57,15 +57,7 @@ ScrollableMessageResponse::ScrollableMessageResponse(
void ScrollableMessageResponse::Run() {
SDL_LOG_AUTO_TRACE();
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- (*message_)[strings::msg_params][strings::result_code].asInt());
- ApplicationSharedPtr application = application_manager_.application(
- (*message_)[strings::params][strings::connection_key].asInt());
- if ((mobile_apis::Result::REJECTED != result_code) && application) {
- application->UnsubscribeFromSoftButtons(
- (*message_)[strings::params][strings::function_id].asInt());
- }
+ application_manager_.UnsubscribeAppFromSoftButtons(message_);
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc
index 7d546079e8..a2362a74bc 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc
@@ -60,6 +60,8 @@ ShowConstantTBTResponse::~ShowConstantTBTResponse() {}
void ShowConstantTBTResponse::Run() {
SDL_LOG_AUTO_TRACE();
+ application_manager_.UnsubscribeAppFromSoftButtons(message_);
+
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc
index bedf91b45c..bf2658128d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc
@@ -59,6 +59,8 @@ UpdateTurnListResponse::~UpdateTurnListResponse() {}
void UpdateTurnListResponse::Run() {
SDL_LOG_AUTO_TRACE();
+ application_manager_.UnsubscribeAppFromSoftButtons(message_);
+
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc
index cf701caf51..a1661dc247 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc
@@ -344,6 +344,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreamingCapability_SUCCESS) {
video_streaming_capability[strings::pixel_per_inch] = 117.f;
video_streaming_capability[strings::scale] = 1.f;
+ video_streaming_capability[strings::preferred_fps] = 30;
ResponseFromHMIPtr command(
CreateCommand<UIGetCapabilitiesResponse>(command_msg));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
index aa199bd112..93ae813535 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
@@ -373,26 +373,27 @@ TEST_F(AddCommandRequestTest, Run_CommandIDAlreadyExists_EXPECT_INVALID_ID) {
request_ptr->Run();
}
-TEST_F(AddCommandRequestTest,
- Run_CommandNameAlreadyExists_EXPECT_DUPLICATE_NAME) {
+TEST_F(AddCommandRequestTest, Run_CommandNameAlreadyExists_EXPECT_Forwarded) {
CreateBasicParamsUIRequest();
- SmartObject& msg_params = (*msg_)[strings::msg_params];
- msg_params[menu_params][hmi_request::parent_id] = kFirstParentId;
- SmartObject& image = msg_params[cmd_icon];
+ (*msg_)[msg_params][menu_name] = kMenuName;
+ SmartObject& image = (*msg_)[msg_params][cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
+ EXPECT_CALL(*mock_app_, AddCommand(_, (*msg_)[msg_params]));
+
SmartObject first_command = SmartObject(SmartType_Map);
SmartObject second_command = SmartObject(SmartType_Map);
- const am::CommandsMap commands_map =
+ am::CommandsMap commands_map =
CreateCommandsMap(first_command, second_command);
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
commands_map, lock_ptr_)));
- EXPECT_CALL(mock_rpc_service_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::DUPLICATE_NAME), _));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(HMIResultCodeIs(hmi_apis::FunctionID::UI_AddCommand), _))
+ .WillOnce(Return(true));
std::shared_ptr<AddCommandRequest> request_ptr =
CreateCommand<AddCommandRequest>(msg_);
request_ptr->Run();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc
index 0034dcf916..d091fdc8c5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc
@@ -93,15 +93,12 @@ class MobileResponseCommandsTest
typedef Types<commands::ListFilesResponse,
commands::DeleteCommandResponse,
- commands::AlertManeuverResponse,
- commands::AlertResponse,
commands::SubscribeButtonResponse,
commands::AddSubMenuResponse,
commands::DialNumberResponse,
commands::EndAudioPassThruResponse,
commands::UnregisterAppInterfaceResponse,
commands::UnsubscribeWayPointsResponse,
- commands::UpdateTurnListResponse,
commands::UnsubscribeButtonResponse,
commands::SliderResponse,
commands::SpeakResponse,
@@ -112,7 +109,6 @@ typedef Types<commands::ListFilesResponse,
commands::PerformAudioPassThruResponse,
commands::SetGlobalPropertiesResponse,
commands::SetMediaClockTimerResponse,
- commands::ShowConstantTBTResponse,
commands::ShowResponse,
commands::SystemResponse,
commands::AddCommandResponse,
@@ -131,6 +127,35 @@ TYPED_TEST(MobileResponseCommandsTest, Run_SendResponseToMobile_SUCCESS) {
command->Run();
}
+template <class CommandWithUnsubscribe>
+class MobileResponseWithUnsubscribeCommandsTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ typedef CommandWithUnsubscribe UnsubscribeCommand;
+};
+
+typedef Types<commands::AlertManeuverResponse,
+ commands::AlertResponse,
+ commands::UpdateTurnListResponse,
+ commands::ScrollableMessageResponse,
+ commands::ShowConstantTBTResponse>
+ ResponseWithUnsubscribeCommandList;
+
+TYPED_TEST_CASE(MobileResponseWithUnsubscribeCommandsTest,
+ ResponseWithUnsubscribeCommandList);
+
+TYPED_TEST(MobileResponseWithUnsubscribeCommandsTest,
+ RunWithUnsubscribe_SUCCESS) {
+ std::shared_ptr<typename TestFixture::UnsubscribeCommand> command =
+ this->template CreateCommand<typename TestFixture::UnsubscribeCommand>();
+
+ EXPECT_CALL(this->app_mngr_, UnsubscribeAppFromSoftButtons(_));
+ EXPECT_CALL(this->mock_rpc_service_, SendMessageToMobile(NotNull(), _));
+
+ command->Init();
+ command->Run();
+}
+
class GenericResponseFromHMICommandsTest
: public CommandsTest<CommandsTestMocks::kIsNice> {};
@@ -145,7 +170,6 @@ MATCHER_P2(CheckMessageParams, success, result, "") {
result ==
static_cast<int32_t>(
(*arg)[am::strings::msg_params][am::strings::result_code].asInt());
-
using namespace helpers;
return Compare<bool, EQ, ALL>(
true, is_msg_type_correct, is_success_correct, is_result_code_correct);
@@ -164,24 +188,6 @@ TEST_F(GenericResponseFromHMICommandsTest, Run_SUCCESS) {
command->Run();
}
-
-class ScrollableMessageResponseTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
-
-TEST_F(ScrollableMessageResponseTest, Run_SUCCESS) {
- MessageSharedPtr message = CreateMessage();
- (*message)[am::strings::msg_params][am::strings::result_code] =
- mobile_apis::Result::SUCCESS;
-
- MockAppPtr app(CreateMockApp());
-
- std::shared_ptr<commands::ScrollableMessageResponse> command(
- CreateCommand<commands::ScrollableMessageResponse>(message));
- EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app));
- EXPECT_CALL(*app, UnsubscribeFromSoftButtons(_));
- command->Run();
-}
-
} // namespace simple_response_commands_test
} // namespace mobile_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index 6b4500e394..2e104f73e2 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -1147,20 +1147,36 @@ uint32_t ApplicationImpl::GetAvailableDiskSpace() {
}
void ApplicationImpl::SubscribeToSoftButtons(
- int32_t cmd_id, const SoftButtonID& softbuttons_id) {
+ int32_t cmd_id, const WindowSoftButtons& window_softbuttons) {
sync_primitives::AutoLock lock(cmd_softbuttonid_lock_);
- if (static_cast<int32_t>(mobile_apis::FunctionID::ScrollableMessageID) ==
- cmd_id) {
- CommandSoftButtonID::iterator it = cmd_softbuttonid_.find(cmd_id);
- if (cmd_softbuttonid_.end() == it) {
- cmd_softbuttonid_[cmd_id] = softbuttons_id;
- }
- } else {
- auto& soft_button_ids = cmd_softbuttonid_[cmd_id];
- for (auto& softbutton_item : softbuttons_id) {
- soft_button_ids.insert(softbutton_item);
- }
+ CommandSoftButtonID::iterator it = cmd_softbuttonid_.find(cmd_id);
+
+ if (cmd_softbuttonid_.end() == it) {
+ SoftButtonIDs soft_buttons{window_softbuttons};
+ cmd_softbuttonid_.insert({cmd_id, soft_buttons});
+ return;
}
+
+ auto& command_soft_buttons = cmd_softbuttonid_[cmd_id];
+
+ const auto window_id = window_softbuttons.first;
+ auto find_window_id = [window_id](const WindowSoftButtons& window_buttons) {
+ return window_id == window_buttons.first;
+ };
+
+ auto subscribed_window_buttons = std::find_if(
+ command_soft_buttons.begin(), command_soft_buttons.end(), find_window_id);
+
+ if (subscribed_window_buttons == command_soft_buttons.end()) {
+ command_soft_buttons.insert(window_softbuttons);
+ return;
+ }
+
+ WindowSoftButtons new_window_soft_buttons = *subscribed_window_buttons;
+ new_window_soft_buttons.second.insert(window_softbuttons.second.begin(),
+ window_softbuttons.second.end());
+ command_soft_buttons.erase(subscribed_window_buttons);
+ command_soft_buttons.insert(new_window_soft_buttons);
}
struct FindSoftButtonId {
@@ -1169,24 +1185,46 @@ struct FindSoftButtonId {
explicit FindSoftButtonId(const uint32_t soft_button_id)
: soft_button_id_(soft_button_id) {}
- bool operator()(const std::pair<uint32_t, WindowID>& element) const {
- return soft_button_id_ == element.first;
+ bool operator()(const uint32_t softbutton_id) {
+ return soft_button_id_ == softbutton_id;
}
};
+struct FindWindowSoftButtonId {
+ public:
+ FindWindowSoftButtonId(const uint32_t soft_button_id)
+ : find_softbutton_id_(soft_button_id) {}
+
+ bool operator()(const WindowSoftButtons& window_buttons) {
+ const auto softbuttons = window_buttons.second;
+ auto found_softbutton = std::find_if(
+ softbuttons.begin(), softbuttons.end(), find_softbutton_id_);
+
+ return found_softbutton != softbuttons.end();
+ }
+
+ private:
+ FindSoftButtonId find_softbutton_id_;
+};
+
bool ApplicationImpl::IsSubscribedToSoftButton(const uint32_t softbutton_id) {
SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(cmd_softbuttonid_lock_);
- CommandSoftButtonID::iterator it = cmd_softbuttonid_.begin();
- for (; it != cmd_softbuttonid_.end(); ++it) {
- const auto& soft_button_ids = (*it).second;
- FindSoftButtonId finder(softbutton_id);
- const auto find_res =
- std::find_if(soft_button_ids.begin(), soft_button_ids.end(), finder);
- if ((soft_button_ids.end() != find_res)) {
+
+ for (const auto& command_soft_buttons : cmd_softbuttonid_) {
+ FindWindowSoftButtonId find_window_softbutton_id(softbutton_id);
+ const auto& window_softbuttons = command_soft_buttons.second;
+
+ const auto found_window_softbutton_id =
+ std::find_if(window_softbuttons.begin(),
+ window_softbuttons.end(),
+ find_window_softbutton_id);
+
+ if (found_window_softbutton_id != window_softbuttons.end()) {
return true;
}
}
+
return false;
}
@@ -1194,14 +1232,18 @@ WindowID ApplicationImpl::GetSoftButtonWindowID(const uint32_t softbutton_id) {
SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(cmd_softbuttonid_lock_);
- CommandSoftButtonID::iterator it = cmd_softbuttonid_.begin();
- for (; it != cmd_softbuttonid_.end(); ++it) {
- const auto& soft_button_ids = (*it).second;
- FindSoftButtonId finder(softbutton_id);
- const auto find_res =
- std::find_if(soft_button_ids.begin(), soft_button_ids.end(), finder);
- if ((soft_button_ids.end() != find_res)) {
- return find_res->second;
+
+ for (const auto& command_soft_buttons : cmd_softbuttonid_) {
+ FindWindowSoftButtonId find_window_softbutton_id(softbutton_id);
+ const auto& window_softbuttons = command_soft_buttons.second;
+
+ const auto found_window_softbutton_id =
+ std::find_if(window_softbuttons.begin(),
+ window_softbuttons.end(),
+ find_window_softbutton_id);
+
+ if (found_window_softbutton_id != window_softbuttons.end()) {
+ return found_window_softbutton_id->first;
}
}
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 2313ce5693..3b1dc1afc6 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -145,10 +145,6 @@ struct PolicyAppIdComparator {
const std::string& policy_app_id_;
};
-uint32_t ApplicationManagerImpl::mobile_corelation_id_ = 0;
-uint32_t ApplicationManagerImpl::corelation_id_ = 0;
-const uint32_t ApplicationManagerImpl::max_corelation_id_ = UINT_MAX;
-
namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
namespace jhs = ns_smart_device_link::ns_json_handler::strings;
@@ -175,6 +171,9 @@ ApplicationManagerImpl::ApplicationManagerImpl(
, policy_handler_(new policy::PolicyHandler(policy_settings, *this))
, protocol_handler_(NULL)
, request_ctrl_(am_settings)
+ , mobile_correlation_id_(0)
+ , correlation_id_(0)
+ , max_correlation_id_(UINT_MAX)
, hmi_capabilities_(new HMICapabilitiesImpl(*this))
, unregister_reason_(
mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM)
@@ -1364,23 +1363,23 @@ ApplicationManagerImpl::GetCloudAppConnectionStatus(
}
uint32_t ApplicationManagerImpl::GetNextMobileCorrelationID() {
- if (mobile_corelation_id_ < max_corelation_id_) {
- mobile_corelation_id_++;
+ if (mobile_correlation_id_ < max_correlation_id_) {
+ mobile_correlation_id_++;
} else {
- mobile_corelation_id_ = 0;
+ mobile_correlation_id_ = 0;
}
- return mobile_corelation_id_;
+ return mobile_correlation_id_;
}
uint32_t ApplicationManagerImpl::GetNextHMICorrelationID() {
- if (corelation_id_ < max_corelation_id_) {
- corelation_id_++;
+ if (correlation_id_ < max_correlation_id_) {
+ correlation_id_++;
} else {
- corelation_id_ = 0;
+ correlation_id_ = 0;
}
- return corelation_id_;
+ return correlation_id_;
}
bool ApplicationManagerImpl::BeginAudioPassThru(uint32_t app_id) {
@@ -3256,6 +3255,7 @@ void ApplicationManagerImpl::UnregisterApplication(
}
ApplicationSharedPtr app_to_remove;
connection_handler::DeviceHandle handle = 0;
+
{
sync_primitives::AutoLock lock(applications_list_lock_ptr_);
auto it_app = applications_.begin();
@@ -3268,64 +3268,65 @@ void ApplicationManagerImpl::UnregisterApplication(
++it_app;
}
}
- if (!app_to_remove) {
- SDL_LOG_ERROR("Cant find application with app_id = " << app_id);
-
- // Just to terminate RAI in case of connection is dropped (rare case)
- // App won't be unregistered since RAI has not been started yet
- SDL_LOG_DEBUG("Trying to terminate possible RAI request.");
- request_ctrl_.terminateAppRequests(app_id);
-
- return;
- }
+ }
+ if (!app_to_remove) {
+ SDL_LOG_ERROR("Cant find application with app_id = " << app_id);
- if (is_resuming) {
- resume_controller().SaveApplication(app_to_remove);
- } else {
- resume_controller().RemoveApplicationFromSaved(app_to_remove);
- }
+ // Just to terminate RAI in case of connection is dropped (rare case)
+ // App won't be unregistered since RAI has not been started yet
+ SDL_LOG_DEBUG("Trying to terminate possible RAI request.");
+ request_ctrl_.terminateAppRequests(app_id);
- if (IsAppSubscribedForWayPoints(app_id)) {
- UnsubscribeAppFromWayPoints(app_id, true);
- if (!IsAnyAppSubscribedForWayPoints()) {
- SDL_LOG_DEBUG("Send UnsubscribeWayPoints");
- auto request = MessageHelper::CreateUnsubscribeWayPointsRequest(
- GetNextHMICorrelationID());
- rpc_service_->ManageHMICommand(request);
- }
- }
+ return;
+ }
- (hmi_capabilities_->get_hmi_language_handler())
- .OnUnregisterApplication(app_id);
+ resume_controller().RemoveFromResumption(app_id);
- if (connection_handler().GetDeviceID(app_to_remove->mac_address(),
- &handle)) {
- AppV4DevicePredicate finder(handle);
- ApplicationSharedPtr app = FindApp(applications(), finder);
- if (!app) {
- SDL_LOG_DEBUG(
- "There is no more SDL4 apps with device handle: " << handle);
+ if (is_resuming) {
+ resume_controller().SaveApplication(app_to_remove);
+ } else {
+ resume_controller().RemoveApplicationFromSaved(app_to_remove);
+ }
- RemoveAppsWaitingForRegistration(handle);
- }
+ if (IsAppSubscribedForWayPoints(app_id)) {
+ UnsubscribeAppFromWayPoints(app_id, true);
+ if (!IsAnyAppSubscribedForWayPoints()) {
+ SDL_LOG_DEBUG("Send UnsubscribeWayPoints");
+ auto request = MessageHelper::CreateUnsubscribeWayPointsRequest(
+ GetNextHMICorrelationID());
+ rpc_service_->ManageHMICommand(request);
}
+ }
- MessageHelper::SendOnAppUnregNotificationToHMI(
- app_to_remove, is_unexpected_disconnect, *this);
- commands_holder_->Clear(app_to_remove);
+ (hmi_capabilities_->get_hmi_language_handler())
+ .OnUnregisterApplication(app_id);
- const auto enabled_local_apps = policy_handler_->GetEnabledLocalApps();
- if (helpers::in_range(enabled_local_apps, app_to_remove->policy_app_id())) {
+ if (connection_handler().GetDeviceID(app_to_remove->mac_address(), &handle)) {
+ AppV4DevicePredicate finder(handle);
+ ApplicationSharedPtr app = FindApp(applications(), finder);
+ if (!app) {
SDL_LOG_DEBUG(
- "Enabled local app has been unregistered. Re-create "
- "pending application");
- CreatePendingLocalApplication(app_to_remove->policy_app_id());
+ "There is no more SDL4 apps with device handle: " << handle);
+
+ RemoveAppsWaitingForRegistration(handle);
}
+ }
- RefreshCloudAppInformation();
- SendUpdateAppList();
+ MessageHelper::SendOnAppUnregNotificationToHMI(
+ app_to_remove, is_unexpected_disconnect, *this);
+ commands_holder_->Clear(app_to_remove);
+
+ const auto enabled_local_apps = policy_handler_->GetEnabledLocalApps();
+ if (helpers::in_range(enabled_local_apps, app_to_remove->policy_app_id())) {
+ SDL_LOG_DEBUG(
+ "Enabled local app has been unregistered. Re-create "
+ "pending application");
+ CreatePendingLocalApplication(app_to_remove->policy_app_id());
}
+ RefreshCloudAppInformation();
+ SendUpdateAppList();
+
if (EndAudioPassThru(app_id)) {
// May be better to put this code in MessageHelper?
StopAudioPassThru(app_id);
@@ -4960,6 +4961,23 @@ bool ApplicationManagerImpl::IsSOStructValid(
return false;
}
+bool ApplicationManagerImpl::UnsubscribeAppFromSoftButtons(
+ const commands::MessageSharedPtr response) {
+ using namespace mobile_apis;
+
+ const uint32_t connection_key =
+ (*response)[strings::params][strings::connection_key].asUInt();
+ const auto function_id = static_cast<FunctionID::eType>(
+ (*response)[strings::params][strings::function_id].asInt());
+
+ ApplicationSharedPtr app = application(connection_key);
+ DCHECK_OR_RETURN(app, false);
+ app->UnsubscribeFromSoftButtons(function_id);
+ SDL_LOG_DEBUG("Application has unsubscribed from softbuttons. FunctionID: "
+ << function_id << ", app_id:" << app->app_id());
+ return true;
+}
+
#ifdef BUILD_TESTS
void ApplicationManagerImpl::AddMockApplication(ApplicationSharedPtr mock_app) {
applications_list_lock_ptr_->Acquire();
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index ba1c726415..52a4afa974 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -183,6 +183,8 @@ std::pair<std::string, mobile_apis::VehicleDataType::eType>
std::make_pair(
strings::cloud_app_vehicle_id,
mobile_apis::VehicleDataType::VEHICLEDATA_CLOUDAPPVEHICLEID),
+ std::make_pair(strings::climate_data,
+ mobile_apis::VehicleDataType::VEHICLEDATA_CLIMATEDATA),
std::make_pair(strings::external_temp,
mobile_apis::VehicleDataType::VEHICLEDATA_EXTERNTEMP),
std::make_pair(strings::turn_signal,
@@ -246,6 +248,8 @@ std::pair<std::string, mobile_apis::VehicleDataType::eType>
mobile_apis::VehicleDataType::VEHICLEDATA_ENGINEOILLIFE),
std::make_pair(strings::window_status,
mobile_apis::VehicleDataType::VEHICLEDATA_WINDOWSTATUS),
+ std::make_pair(strings::seat_occupancy,
+ mobile_apis::VehicleDataType::VEHICLEDATA_SEATOCCUPANCY),
std::make_pair(
strings::hands_off_steering,
mobile_apis::VehicleDataType::VEHICLEDATA_HANDSOFFSTEERING)};
@@ -1244,38 +1248,38 @@ MessageHelper::CreateGlobalPropertiesRequestsToHMI(
// UI global properties
- if (can_send_ui && (app->vr_help_title() || app->vr_help())) {
+ if (can_send_ui &&
+ (app->vr_help_title() || app->vr_help() || app->keyboard_props() ||
+ app->menu_title() || app->menu_icon())) {
smart_objects::SmartObjectSPtr ui_global_properties = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
- if (!ui_global_properties) {
- return requests;
- }
-
- (*ui_global_properties)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::UI_SetGlobalProperties);
+ if (ui_global_properties) {
+ (*ui_global_properties)[strings::params][strings::function_id] =
+ static_cast<int>(hmi_apis::FunctionID::UI_SetGlobalProperties);
- smart_objects::SmartObject ui_msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- if (app->vr_help_title()) {
- ui_msg_params[strings::vr_help_title] = (*app->vr_help_title());
- }
- if (app->vr_help()) {
- ui_msg_params[strings::vr_help] = (*app->vr_help());
- }
- if (app->keyboard_props()) {
- ui_msg_params[strings::keyboard_properties] = (*app->keyboard_props());
- }
- if (app->menu_title()) {
- ui_msg_params[strings::menu_title] = (*app->menu_title());
- }
- if (app->menu_icon()) {
- ui_msg_params[strings::menu_icon] = (*app->menu_icon());
- }
- ui_msg_params[strings::app_id] = app->app_id();
+ smart_objects::SmartObject ui_msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ if (app->vr_help_title()) {
+ ui_msg_params[strings::vr_help_title] = (*app->vr_help_title());
+ }
+ if (app->vr_help()) {
+ ui_msg_params[strings::vr_help] = (*app->vr_help());
+ }
+ if (app->keyboard_props()) {
+ ui_msg_params[strings::keyboard_properties] = (*app->keyboard_props());
+ }
+ if (app->menu_title()) {
+ ui_msg_params[strings::menu_title] = (*app->menu_title());
+ }
+ if (app->menu_icon()) {
+ ui_msg_params[strings::menu_icon] = (*app->menu_icon());
+ }
+ ui_msg_params[strings::app_id] = app->app_id();
- (*ui_global_properties)[strings::msg_params] = ui_msg_params;
+ (*ui_global_properties)[strings::msg_params] = ui_msg_params;
- requests.push_back(ui_global_properties);
+ requests.push_back(ui_global_properties);
+ }
}
const bool can_send_vr = helpers::
@@ -1289,27 +1293,46 @@ MessageHelper::CreateGlobalPropertiesRequestsToHMI(
uint32_t correlation_id = app_mngr.GetNextHMICorrelationID();
smart_objects::SmartObjectSPtr tts_global_properties =
CreateMessageForHMI(hmi_apis::messageType::request, correlation_id);
- if (!tts_global_properties) {
- return requests;
- }
+ if (tts_global_properties) {
+ (*tts_global_properties)[strings::params][strings::function_id] =
+ static_cast<int>(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- (*tts_global_properties)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::TTS_SetGlobalProperties);
+ smart_objects::SmartObject tts_msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ if (app->help_prompt()) {
+ tts_msg_params[strings::help_prompt] = (*app->help_prompt());
+ }
+ if (app->timeout_prompt()) {
+ tts_msg_params[strings::timeout_prompt] = (*app->timeout_prompt());
+ }
+ tts_msg_params[strings::app_id] = app->app_id();
- smart_objects::SmartObject tts_msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- if (app->help_prompt()) {
- tts_msg_params[strings::help_prompt] = (*app->help_prompt());
- }
- if (app->timeout_prompt()) {
- tts_msg_params[strings::timeout_prompt] = (*app->timeout_prompt());
+ (*tts_global_properties)[strings::msg_params] = tts_msg_params;
+
+ requests.push_back(tts_global_properties);
}
- tts_msg_params[strings::app_id] = app->app_id();
+ }
+
+ // RC global properties
+ if (!app->get_user_location().empty()) {
+ smart_objects::SmartObjectSPtr rc_global_properties = CreateMessageForHMI(
+ hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
+ if (rc_global_properties) {
+ (*rc_global_properties)[strings::params][strings::function_id] =
+ static_cast<int>(hmi_apis::FunctionID::RC_SetGlobalProperties);
+
+ smart_objects::SmartObject rc_msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ rc_msg_params[strings::user_location] = (app->get_user_location());
+ rc_msg_params[strings::app_id] = app->app_id();
- (*tts_global_properties)[strings::msg_params] = tts_msg_params;
+ (*rc_global_properties)[strings::msg_params] = rc_msg_params;
- requests.push_back(tts_global_properties);
+ requests.push_back(rc_global_properties);
+ }
}
+
return requests;
}
@@ -3365,16 +3388,20 @@ void MessageHelper::SubscribeApplicationToSoftButton(
ApplicationSharedPtr app,
int32_t function_id,
const WindowID window_id) {
- SoftButtonID softbuttons_id;
- smart_objects::SmartObject& soft_buttons =
- message_params[strings::soft_buttons];
- unsigned int length = soft_buttons.length();
- for (unsigned int i = 0; i < length; ++i) {
- const auto button_id = std::make_pair(
- soft_buttons[i][strings::soft_button_id].asUInt(), window_id);
- softbuttons_id.insert(button_id);
- }
- app->SubscribeToSoftButtons(function_id, softbuttons_id);
+ if (!message_params.keyExists(strings::soft_buttons)) {
+ return;
+ }
+
+ std::set<uint32_t> soft_buttons;
+
+ auto& soft_buttons_so = message_params[strings::soft_buttons];
+ for (const auto& softbutton : *(soft_buttons_so.asArray())) {
+ const auto button_id = softbutton[strings::soft_button_id].asUInt();
+ soft_buttons.insert(button_id);
+ }
+
+ WindowSoftButtons window_buttons{window_id, soft_buttons};
+ app->SubscribeToSoftButtons(function_id, window_buttons);
}
void MessageHelper::SubscribeApplicationToSoftButton(
diff --git a/src/components/application_manager/src/resumption/resumption_data_db.cc b/src/components/application_manager/src/resumption/resumption_data_db.cc
index f00b100913..eedfc48b73 100644
--- a/src/components/application_manager/src/resumption/resumption_data_db.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_db.cc
@@ -37,6 +37,7 @@
#include "application_manager/message_helper.h"
#include "application_manager/resumption/resumption_data_db.h"
#include "application_manager/resumption/resumption_sql_queries.h"
+#include "application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h"
#include "application_manager/smart_object_keys.h"
#include "utils/gen_hash.h"
#include "utils/helpers.h"
@@ -326,6 +327,12 @@ bool ResumptionDataDB::GetSavedApplication(
SDL_LOG_ERROR("Problem with restoring of global properties data");
return false;
}
+
+ if (!SelectUserLocationData(policy_app_id, device_id, saved_app)) {
+ SDL_LOG_ERROR("Problem with restoring of user location data");
+ return false;
+ }
+
SDL_LOG_INFO("Application data were successfully fetched from data base");
return true;
}
@@ -762,6 +769,9 @@ bool ResumptionDataDB::DropAppDataResumption(const std::string& device_id,
if (!DeleteSavedGlobalProperties(app_id, device_id)) {
return false;
}
+ if (!DeleteUserLocation(app_id, device_id)) {
+ return false;
+ }
if (!UpdateGrammarID(app_id, device_id, 0)) {
return false;
}
@@ -1006,6 +1016,58 @@ bool ResumptionDataDB::SelectSubscriptionsData(
return true;
}
+bool ResumptionDataDB::SelectUserLocationData(
+ const std::string& policy_app_id,
+ const std::string& device_id,
+ smart_objects::SmartObject& saved_app) const {
+ SDL_LOG_AUTO_TRACE();
+ using namespace app_mngr;
+ using namespace smart_objects;
+ uint32_t count_item = 0;
+ if (!SelectCountFromArray(
+ count_item, kSelectCountUserLocation, policy_app_id, device_id)) {
+ SDL_LOG_ERROR("Select query has been failed");
+ return false;
+ }
+
+ if (0 == count_item) {
+ SDL_LOG_DEBUG("Application does not contain user_location data");
+ return true;
+ }
+ utils::dbms::SQLQuery select_user_location(db());
+ if (!PrepareSelectQuery(select_user_location,
+ policy_app_id,
+ device_id,
+ kSelectUserLocation)) {
+ SDL_LOG_ERROR("Failed to prepare user location select query");
+ return false;
+ }
+
+ if (!select_user_location.Exec()) {
+ SDL_LOG_ERROR("Failed to execute user location select query");
+ return false;
+ }
+ /* Position of data in "select_user_location" :
+ field "col" from table "applicationUserLocation" = 0
+ field "colspan" from table "applicationUserLocation" = 1
+ field "level" from table "applicationUserLocation" = 2
+ field "levelspan" from table "applicationUserLocation" = 3
+ field "row" from table "applicationUserLocation" = 4
+ field "rowspan" from table "applicationUserLocation" = 5*/
+ smart_objects::SmartObject grid =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ grid[rc_rpc_plugin::strings::kCol] = select_user_location.GetInteger(0);
+ grid[rc_rpc_plugin::strings::kColspan] = select_user_location.GetInteger(1);
+ grid[rc_rpc_plugin::strings::kLevel] = select_user_location.GetInteger(2);
+ grid[rc_rpc_plugin::strings::kLevelspan] = select_user_location.GetInteger(3);
+ grid[rc_rpc_plugin::strings::kRow] = select_user_location.GetInteger(4);
+ grid[rc_rpc_plugin::strings::kRowspan] = select_user_location.GetInteger(5);
+
+ saved_app[strings::user_location][rc_rpc_plugin::strings::kGrid] = grid;
+
+ return true;
+}
+
bool ResumptionDataDB::SelectChoiceSetData(
const std::string& policy_app_id,
const std::string& device_id,
@@ -1519,6 +1581,18 @@ bool ResumptionDataDB::DeleteSavedSubscriptions(
return true;
}
+bool ResumptionDataDB::DeleteUserLocation(const std::string& policy_app_id,
+ const std::string& device_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!ExecQueryToDeleteData(
+ policy_app_id, device_id, kDeleteApplicationUserLocation)) {
+ SDL_LOG_WARN("Incorrect delete from applicationUserLocation.");
+ return false;
+ }
+ return true;
+}
+
bool ResumptionDataDB::DeleteSavedCommands(const std::string& policy_app_id,
const std::string& device_id) {
SDL_LOG_AUTO_TRACE();
@@ -1914,6 +1988,12 @@ bool ResumptionDataDB::SaveApplicationToDB(
db_->RollbackTransaction();
return false;
}
+ if (!InsertUserLocationData(application->get_user_location(),
+ application_primary_key)) {
+ SDL_LOG_WARN("Incorrect insert user location to DB.");
+ db_->RollbackTransaction();
+ return false;
+ }
db_->CommitTransaction();
return true;
}
@@ -1973,6 +2053,12 @@ bool ResumptionDataDB::SaveApplicationToDB(
db_->RollbackTransaction();
return false;
}
+ if (!InsertUserLocationData(application["userLocation"],
+ application_primary_key)) {
+ SDL_LOG_WARN("Incorrect insert userLocation to DB.");
+ db_->RollbackTransaction();
+ return false;
+ }
db_->CommitTransaction();
return true;
}
@@ -2222,6 +2308,58 @@ bool ResumptionDataDB::InsertChoiceSetData(
return true;
}
+bool ResumptionDataDB::InsertUserLocationData(
+ const smart_objects::SmartObject& user_location,
+ int64_t application_primary_key) const {
+ SDL_LOG_AUTO_TRACE();
+ using namespace app_mngr;
+ using namespace smart_objects;
+
+ if (user_location.empty()) {
+ SDL_LOG_DEBUG("Application doesn't contain user location");
+ return true;
+ }
+
+ const auto grid = user_location[rc_rpc_plugin::strings::kGrid];
+ const int32_t col = grid[rc_rpc_plugin::strings::kCol].asInt();
+ const int32_t row = grid[rc_rpc_plugin::strings::kRow].asInt();
+ const int32_t level = grid[rc_rpc_plugin::strings::kLevel].asInt();
+ const int32_t colspan = grid[rc_rpc_plugin::strings::kColspan].asInt();
+ const int32_t rowspan = grid[rc_rpc_plugin::strings::kRowspan].asInt();
+ const int32_t levelspan = grid[rc_rpc_plugin::strings::kLevelspan].asInt();
+
+ utils::dbms::SQLQuery insert_application_user_location(db());
+ if (!insert_application_user_location.Prepare(kInsertUserLocation)) {
+ SDL_LOG_WARN(
+ "Problem with preparation insert "
+ "application user location query");
+ return false;
+ }
+
+ /* Positions of binding data for "insert_application_user_location":
+ field "idApplication" from table "applicationUserLocation" = 0
+ field "col" from table "applicationUserLocation" = 1
+ field "colspan" from table "applicationUserLocation" = 2
+ field "level" from table "applicationUserLocation" = 3
+ field "levelspan" from table "applicationUserLocation" = 4
+ field "row" from table "applicationUserLocation" = 5
+ field "rowspan" from table "applicationUserLocation" = 6*/
+ insert_application_user_location.Bind(0, application_primary_key);
+ insert_application_user_location.Bind(1, col);
+ insert_application_user_location.Bind(2, colspan);
+ insert_application_user_location.Bind(3, level);
+ insert_application_user_location.Bind(4, levelspan);
+ insert_application_user_location.Bind(5, row);
+ insert_application_user_location.Bind(6, rowspan);
+
+ if (!insert_application_user_location.Exec()) {
+ SDL_LOG_WARN("Incorrect insertion of user location");
+ return false;
+ }
+
+ return true;
+}
+
bool ResumptionDataDB::ExecInsertApplicationChoiceSet(
int64_t& choice_set_primary_key,
const smart_objects::SmartObject& choiceset) const {
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc
index f3d417d128..1f2d0f116f 100644
--- a/src/components/application_manager/src/resumption/resumption_data_json.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_json.cc
@@ -107,6 +107,9 @@ void ResumptionDataJson::SaveApplication(
json_app[strings::windows_info] = tmp;
json_app[strings::time_stamp] = time_stamp;
json_app[strings::subscribed_for_way_points] = is_subscribed_for_way_points;
+ formatters::CFormatterJsonBase::objToJsonValue(
+ application->get_user_location(), tmp);
+ json_app[strings::user_location] = tmp;
accessor.GetMutableData().set_dictionary(dictionary);
SDL_LOG_DEBUG("SaveApplication : " << json_app.toStyledString());
@@ -557,6 +560,7 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
application[strings::application_global_properties].clear();
application[strings::application_subscriptions].clear();
application[strings::application_files].clear();
+ application[strings::user_location].clear();
application.removeMember(strings::grammar_id);
accessor.GetMutableData().set_dictionary(dictionary);
SDL_LOG_DEBUG("Resumption data for application "
diff --git a/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
index 3b091c74a8..504db76a82 100644
--- a/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
@@ -744,6 +744,10 @@ void ResumptionDataProcessorImpl::SetGlobalProperties(
saved_app[strings::application_global_properties];
application->load_global_properties(properties_so);
+ if (saved_app.keyExists(strings::user_location)) {
+ application->set_user_location(saved_app[strings::user_location]);
+ }
+
ProcessMessagesToHMI(MessageHelper::CreateGlobalPropertiesRequestsToHMI(
application, application_manager_));
}
diff --git a/src/components/application_manager/src/resumption/resumption_sql_queries.cc b/src/components/application_manager/src/resumption/resumption_sql_queries.cc
index 4770bafef4..cfcac136aa 100644
--- a/src/components/application_manager/src/resumption/resumption_sql_queries.cc
+++ b/src/components/application_manager/src/resumption/resumption_sql_queries.cc
@@ -314,6 +314,23 @@ const std::string kCreateSchema =
"CREATE TABLE IF NOT EXISTS `_internal_data`( "
" `db_version_hash` INTEGER "
" ); "
+ "CREATE TABLE IF NOT EXISTS `applicationUserLocation`( "
+ " `idLocation` INTEGER PRIMARY KEY NOT NULL, "
+ " `idApplication` INTEGER, "
+ " `col` INTEGER, "
+ " `colspan` INTEGER, "
+ " `level` INTEGER, "
+ " `levelspan` INTEGER, "
+ " `row` INTEGER, "
+ " `rowspan` INTEGER, "
+ " CONSTRAINT `fk_Application` "
+ " FOREIGN KEY(`idApplication`) "
+ " REFERENCES `application`(`idApplication`) "
+ " ); "
+ "CREATE INDEX IF NOT EXISTS "
+ "`applicationUserLocation.fk_Application_idx` "
+ " ON `applicationUserLocation`(`idApplication`); "
+
"COMMIT;";
const std::string kDropSchema =
@@ -369,6 +386,8 @@ const std::string kDropSchema =
"DROP TABLE IF EXISTS `applicationSubscriptionsArray`; "
"DROP INDEX IF EXISTS `applicationSubscriptionsArray.fk_Application_idx`; "
"DROP TABLE IF EXISTS `_internal_data`; "
+ "DROP TABLE IF EXISTS `applicationUserLocation`; "
+ "DROP INDEX IF EXISTS `applicationUserLocation.fk_Application_idx`; "
"COMMIT; "
"VACUUM;";
@@ -497,6 +516,12 @@ const std::string kDeleteApplicationSubscriptionsArray =
"FROM `application` "
"WHERE `appID` = ? AND `deviceID` = ?)";
+const std::string kDeleteApplicationUserLocation =
+ "DELETE FROM `applicationUserLocation` "
+ "WHERE `idApplication` = (SELECT `idApplication` "
+ "FROM `application` "
+ "WHERE `appID` = ? AND `deviceID` = ?)";
+
const std::string kDeleteImageFromCommands =
"DELETE FROM `image` "
"WHERE `idimage` IN (SELECT `idimage` "
@@ -732,6 +757,13 @@ const std::string kInsertSubscriptions =
"VALUES "
"(?, ?, ?);";
+const std::string kInsertUserLocation =
+ "INSERT INTO `applicationUserLocation` "
+ "(`idApplication`, `col`, `colspan`, `level`, `levelspan`, `row`, "
+ "`rowspan`) "
+ "VALUES "
+ "(?, ?, ?, ?, ?, ?, ?);";
+
const std::string kInsertChoice =
"INSERT INTO `choice` "
"(`choiceID`, `menuName`, `secondaryText`, "
@@ -877,6 +909,18 @@ const std::string kSelectSubscriptions =
"FROM `application` "
"WHERE `appID` = ? AND `deviceID` = ?);";
+const std::string kSelectCountUserLocation =
+ "SELECT COUNT (*) "
+ "FROM `applicationUserLocation` INNER JOIN `application` ON "
+ "`applicationUserLocation`.`idApplication` = `application`.`idApplication` "
+ "WHERE `appID` = ? AND `deviceID` = ?";
+
+const std::string kSelectUserLocation =
+ "SELECT `col`, `colspan`, `level`, `levelspan`, `row`, `rowspan` "
+ "FROM `applicationUserLocation` INNER JOIN `application` ON "
+ "`applicationUserLocation`.`idApplication` = `application`.`idApplication` "
+ "WHERE `appID` = ? AND `deviceID` = ?";
+
const std::string kSelectCountChoiceSet =
"SELECT COUNT (`idApplication`) "
"FROM `applicationChoiceSetArray` "
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index d1671f5477..8d3aaf5b1a 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -266,6 +266,7 @@ const char* fuel_level_state = "fuelLevel_State";
const char* instant_fuel_consumption = "instantFuelConsumption";
const char* fuel_range = "fuelRange";
const char* cloud_app_vehicle_id = "cloudAppVehicleID";
+const char* climate_data = "climateData";
const char* external_temp = "externalTemperature";
const char* turn_signal = "turnSignal";
const char* vin = "vin";
@@ -312,6 +313,7 @@ const char* engine_oil_life = "engineOilLife";
const char* oem_custom_data_type = "oemCustomDataType";
const char* window_status = "windowStatus";
const char* hands_off_steering = "handsOffSteering";
+const char* seat_occupancy = "seatOccupancy";
// app services
const char* app_service_manifest = "appServiceManifest";
@@ -447,6 +449,7 @@ const char* const haptic_rect_data = "hapticRectData";
const char* const rect = "rect";
const char* const x = "x";
const char* const y = "y";
+const char* const preferred_fps = "preferredFPS";
} // namespace strings
namespace hmi_interface {
diff --git a/src/components/application_manager/test/CMakeLists.txt b/src/components/application_manager/test/CMakeLists.txt
index c9c9a80391..7b1a262f1b 100755
--- a/src/components/application_manager/test/CMakeLists.txt
+++ b/src/components/application_manager/test/CMakeLists.txt
@@ -130,8 +130,8 @@ if (ENABLE_LOG)
list(APPEND LIBRARIES expat -L${EXPAT_LIBS_DIRECTORY})
endif()
+file(COPY ${CMAKE_SOURCE_DIR}/src/appMain/sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY smartDeviceLink_test2.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY sdl_pt_update.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_command(
diff --git a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
index 08868a239f..41d300cc4a 100644
--- a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
+++ b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
@@ -202,7 +202,7 @@ TEST_F(AppLaunchCtrlTest, StoredAppIsLaunchedAfterDeviceConnected) {
app_launch::ApplicationDataPtr app_to_launch = GetTestAppData(0);
MockAppPtr app = GetTestApp(0);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
applications_on_device.push_back(app_to_launch);
EXPECT_CALL(app_launch_data_mock_,
GetApplicationDataByDevice(app_to_launch->device_mac_))
@@ -212,11 +212,11 @@ TEST_F(AppLaunchCtrlTest, StoredAppIsLaunchedAfterDeviceConnected) {
RunAppOnDevice(app_to_launch->device_mac_, app_to_launch->bundle_id_))
.Times(AtLeast(1))
.WillOnce(DoAll(InvokeOnAppRegistered(app_launch_ctrl_.get(), app.get()),
- NotifyTestAsyncWaiter(&waiter)));
+ NotifyTestAsyncWaiter(waiter)));
app_launch_ctrl_->OnDeviceConnected(app_to_launch->device_mac_);
const uint32_t wait_time =
MAX_TEST_DURATION + settings_.app_launch_wait_time();
- EXPECT_TRUE(waiter.WaitFor(1, wait_time));
+ EXPECT_TRUE(waiter->WaitFor(1, wait_time));
}
TEST_F(AppLaunchCtrlTest, RelaunchAppIfNotRegisteredMultipleTimes) {
@@ -224,7 +224,7 @@ TEST_F(AppLaunchCtrlTest, RelaunchAppIfNotRegisteredMultipleTimes) {
app_launch::ApplicationDataPtr app_to_launch = GetTestAppData(0);
applications_on_device.push_back(app_to_launch);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
const uint32_t times = settings_.app_launch_max_retry_attempt();
EXPECT_CALL(app_launch_data_mock_,
GetApplicationDataByDevice(app_to_launch->device_mac_))
@@ -234,14 +234,14 @@ TEST_F(AppLaunchCtrlTest, RelaunchAppIfNotRegisteredMultipleTimes) {
connection_handler_mock_,
RunAppOnDevice(app_to_launch->device_mac_, app_to_launch->bundle_id_))
.Times(times)
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
app_launch_ctrl_->OnDeviceConnected(app_to_launch->device_mac_);
const uint32_t wait_time = MAX_TEST_DURATION +
settings_.app_launch_wait_time() +
settings_.app_launch_max_retry_attempt() *
settings_.app_launch_retry_wait_time();
- EXPECT_TRUE(waiter.WaitFor(times, wait_time));
+ EXPECT_TRUE(waiter->WaitFor(times, wait_time));
}
TEST_F(AppLaunchCtrlTest, LaunchMultipleApps) {
@@ -253,7 +253,7 @@ TEST_F(AppLaunchCtrlTest, LaunchMultipleApps) {
apps.push_back(it->second);
}
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
const uint32_t times = apps_and_data.size();
EXPECT_CALL(app_launch_data_mock_, GetApplicationDataByDevice(DeviceMac(1)))
.WillOnce(Return(apps));
@@ -267,13 +267,13 @@ TEST_F(AppLaunchCtrlTest, LaunchMultipleApps) {
.Times(AtLeast(1))
.WillOnce(DoAll(
InvokeOnAppRegistered(app_launch_ctrl_.get(), it->first.get()),
- NotifyTestAsyncWaiter(&waiter)));
+ NotifyTestAsyncWaiter(waiter)));
}
app_launch_ctrl_->OnDeviceConnected(DeviceMac(1));
const uint32_t wait_time = MAX_TEST_DURATION +
settings_.app_launch_wait_time() +
apps.size() * settings_.wait_time_between_apps();
- waiter.WaitFor(times, wait_time);
+ waiter->WaitFor(times, wait_time);
}
TEST_F(AppLaunchCtrlTest, LaunchMultipleAppsNoRegister) {
@@ -285,7 +285,7 @@ TEST_F(AppLaunchCtrlTest, LaunchMultipleAppsNoRegister) {
apps.push_back(it->second);
}
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
const uint32_t times =
settings_.app_launch_max_retry_attempt() * apps_and_data.size();
EXPECT_CALL(app_launch_data_mock_, GetApplicationDataByDevice(DeviceMac(1)))
@@ -300,13 +300,13 @@ TEST_F(AppLaunchCtrlTest, LaunchMultipleAppsNoRegister) {
RunAppOnDevice(app_data.second->device_mac_,
app_data.second->bundle_id_))
.Times(settings_.app_launch_max_retry_attempt())
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
}
app_launch_ctrl_->OnDeviceConnected(DeviceMac(1));
const uint32_t wait_time = MAX_TEST_DURATION +
settings_.app_launch_wait_time() +
apps.size() * settings_.wait_time_between_apps();
- waiter.WaitFor(times, wait_time);
+ waiter->WaitFor(times, wait_time);
}
TEST_F(AppLaunchCtrlTest, LaunchMultipleAppsInHMILevelOrder) {
@@ -343,7 +343,7 @@ TEST_F(AppLaunchCtrlTest, LaunchMultipleAppsInHMILevelOrder) {
apps.push_back(app_data);
}
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
const uint32_t times = apps_and_data.size();
EXPECT_CALL(app_launch_data_mock_, GetApplicationDataByDevice(DeviceMac(1)))
.WillOnce(Return(apps));
@@ -356,7 +356,7 @@ TEST_F(AppLaunchCtrlTest, LaunchMultipleAppsInHMILevelOrder) {
.Times(AtLeast(1))
.WillRepeatedly(DoAll(
InvokeOnAppRegistered(app_launch_ctrl_.get(), it->first.get()),
- NotifyTestAsyncWaiter(&waiter)));
+ NotifyTestAsyncWaiter(waiter)));
}
app_launch_ctrl_->OnDeviceConnected(DeviceMac(1));
@@ -364,7 +364,7 @@ TEST_F(AppLaunchCtrlTest, LaunchMultipleAppsInHMILevelOrder) {
const uint32_t wait_time = MAX_TEST_DURATION +
settings_.app_launch_wait_time() +
apps.size() * settings_.wait_time_between_apps();
- waiter.WaitFor(times, wait_time);
+ waiter->WaitFor(times, wait_time);
}
} // namespace app_launch_test
diff --git a/src/components/application_manager/test/application_impl_test.cc b/src/components/application_manager/test/application_impl_test.cc
index d468c9790b..c3d02271cf 100644
--- a/src/components/application_manager/test/application_impl_test.cc
+++ b/src/components/application_manager/test/application_impl_test.cc
@@ -571,14 +571,17 @@ TEST_F(ApplicationImplTest, SubscribeToSoftButton_UnsubscribeFromSoftButton) {
EXPECT_FALSE(app_impl->IsSubscribedToSoftButton(i));
}
- SoftButtonID test_button;
+ std::set<uint32_t> softbuttons_ids;
+
for (uint i = 0; i < btn_count; i++) {
- test_button.insert(std::make_pair(
- i,
- static_cast<WindowID>(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)));
+ softbuttons_ids.insert(i);
}
+
+ WindowSoftButtons window_softbuttons{
+ static_cast<WindowID>(mobile_apis::PredefinedWindows::DEFAULT_WINDOW),
+ softbuttons_ids};
app_impl->SubscribeToSoftButtons(FunctionID::ScrollableMessageID,
- test_button);
+ window_softbuttons);
for (uint i = 0; i < btn_count; i++) {
EXPECT_TRUE(app_impl->IsSubscribedToSoftButton(i));
diff --git a/src/components/application_manager/test/application_manager_impl_test.cc b/src/components/application_manager/test/application_manager_impl_test.cc
index ab49e93e77..48ba75275b 100644
--- a/src/components/application_manager/test/application_manager_impl_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_test.cc
@@ -159,9 +159,7 @@ struct ServiceStatus {
: service_type_(type), service_event_(event), reason_(reason) {}
};
-class ApplicationManagerImplTest
- : public ::testing::Test,
- public ::testing::WithParamInterface<ServiceStatus> {
+class ApplicationManagerImplTest : public ::testing::Test {
public:
ApplicationManagerImplTest()
: app_id_(0u)
@@ -406,9 +404,13 @@ MATCHER_P(HMIFunctionIDIs, result_code, "") {
.asInt());
}
+class ApplicationManagerImplTestWithServiceStatus
+ : public ::testing::WithParamInterface<ServiceStatus>,
+ public ApplicationManagerImplTest {};
+
INSTANTIATE_TEST_CASE_P(
ProcessServiceStatusUpdate_REQUEST_ACCEPTED,
- ApplicationManagerImplTest,
+ ApplicationManagerImplTestWithServiceStatus,
::testing::Values(ServiceStatus(ServiceType::AUDIO,
ServiceEvent::REQUEST_ACCEPTED,
UpdateReasonOptional::EMPTY),
@@ -421,7 +423,7 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
ProcessServiceStatusUpdate_REQUEST_RECEIVED,
- ApplicationManagerImplTest,
+ ApplicationManagerImplTestWithServiceStatus,
::testing::Values(ServiceStatus(ServiceType::AUDIO,
ServiceEvent::REQUEST_RECEIVED,
UpdateReasonOptional::EMPTY),
@@ -434,7 +436,7 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
ProcessServiceStatusUpdate_REQUEST_REJECTED,
- ApplicationManagerImplTest,
+ ApplicationManagerImplTestWithServiceStatus,
::testing::Values(ServiceStatus(ServiceType::AUDIO,
ServiceEvent::REQUEST_REJECTED,
UpdateReasonOptional::EMPTY),
@@ -445,7 +447,7 @@ INSTANTIATE_TEST_CASE_P(
ServiceEvent::REQUEST_REJECTED,
UpdateReasonOptional::EMPTY)));
-TEST_P(ApplicationManagerImplTest,
+TEST_P(ApplicationManagerImplTestWithServiceStatus,
ProcessServiceStatusUpdate_SendMessageToHMI) {
smart_objects::SmartObjectSPtr notification_ =
std::make_shared<smart_objects::SmartObject>(
@@ -2294,6 +2296,42 @@ TEST_F(
app_manager_impl_->RequestForInterfacesAvailability();
}
+class ApplicationManagerImplTestWithFunctionID
+ : public ::testing::WithParamInterface<mobile_apis::FunctionID::eType>,
+ public ApplicationManagerImplTest {};
+
+TEST_P(ApplicationManagerImplTestWithFunctionID,
+ UnsubscribeAppFromSoftButtons_SUCCESS) {
+ AddMockApplication();
+ commands::MessageSharedPtr response_message =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+
+ const mobile_apis::FunctionID::eType function_id = GetParam();
+ (*response_message)[strings::params][strings::connection_key] =
+ kConnectionKey;
+ (*response_message)[strings::msg_params][strings::result_code] =
+ mobile_apis::Result::SUCCESS;
+ (*response_message)[strings::params][strings::function_id] = function_id;
+
+ EXPECT_CALL(*mock_app_ptr_, app_id()).WillOnce(Return(kConnectionKey));
+ EXPECT_CALL(*mock_app_ptr_, UnsubscribeFromSoftButtons(function_id));
+
+ const bool unsubscribe_result =
+ app_manager_impl_->UnsubscribeAppFromSoftButtons(response_message);
+
+ EXPECT_TRUE(unsubscribe_result);
+}
+
+INSTANTIATE_TEST_CASE_P(
+ UnsubscribeAppFromSoftButtons,
+ ApplicationManagerImplTestWithFunctionID,
+ ::testing::Values(mobile_apis::FunctionID::ScrollableMessageID,
+ mobile_apis::FunctionID::AlertID,
+ mobile_apis::FunctionID::AlertManeuverID,
+ mobile_apis::FunctionID::UpdateTurnListID,
+ mobile_apis::FunctionID::ShowConstantTBTID));
+
} // namespace application_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/application_manager/test/hmi_capabilities_test.cc b/src/components/application_manager/test/hmi_capabilities_test.cc
index 4e2e948335..1377b0bc22 100644
--- a/src/components/application_manager/test/hmi_capabilities_test.cc
+++ b/src/components/application_manager/test/hmi_capabilities_test.cc
@@ -556,6 +556,7 @@ TEST_F(
vs_capability_so.keyExists(strings::haptic_spatial_data_supported));
EXPECT_FALSE(
vs_capability_so[strings::haptic_spatial_data_supported].asBool());
+ EXPECT_TRUE(vs_capability_so.keyExists(strings::preferred_fps));
EXPECT_TRUE(hmi_capabilities_->video_streaming_supported());
}
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 454b43b99f..9c28d321fa 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
@@ -206,9 +206,10 @@ class MockApplication : public ::application_manager::Application {
MOCK_METHOD2(RemoveHMIState,
void(const application_manager::WindowID window_id,
::application_manager::HmiState::StateID state_id));
- MOCK_METHOD2(SubscribeToSoftButtons,
- void(int32_t cmd_id,
- const ::application_manager::SoftButtonID& softbuttons_id));
+ MOCK_METHOD2(
+ SubscribeToSoftButtons,
+ void(int32_t cmd_id,
+ const application_manager::WindowSoftButtons& window_softbuttons));
MOCK_METHOD1(IsSubscribedToSoftButton, bool(const uint32_t softbutton_id));
MOCK_METHOD1(UnsubscribeFromSoftButtons, void(int32_t cmd_id));
MOCK_CONST_METHOD0(IsAudioApplication, bool());
diff --git a/src/components/application_manager/test/include/application_manager/resumption_data_test.h b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
index e38b428877..0596b4e500 100644
--- a/src/components/application_manager/test/include/application_manager/resumption_data_test.h
+++ b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
@@ -157,6 +157,7 @@ class ResumptionDataTest : public ::testing::Test {
am::SubMenuMap test_submenu_map;
am::ChoiceSetMap test_choiceset_map;
am::AppFilesMap app_files_map_;
+ smart_objects::SmartObject user_location_;
am::ButtonSubscriptions btn_subscr;
diff --git a/src/components/application_manager/test/message_helper/message_helper_test.cc b/src/components/application_manager/test/message_helper/message_helper_test.cc
index c380805bc2..f6ee2b654a 100644
--- a/src/components/application_manager/test/message_helper/message_helper_test.cc
+++ b/src/components/application_manager/test/message_helper/message_helper_test.cc
@@ -46,6 +46,7 @@
#include "application_manager/mock_rpc_service.h"
#include "application_manager/policies/policy_handler.h"
#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h"
#include "application_manager/state_controller.h"
#include "policy/mock_policy_settings.h"
#include "smart_objects/enum_schema_item.h"
@@ -167,6 +168,12 @@ TEST(MessageHelperTestCreate,
EXPECT_CALL(*mock_help_prompt_manager, GetSendingType())
.WillRepeatedly(Return(HelpPromptManager::SendingType::kSendBoth));
+ smart_objects::SmartObject user_loc =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ EXPECT_CALL(*appSharedMock, get_user_location())
+ .WillRepeatedly(ReturnRef(user_loc));
+
application_manager_test::MockApplicationManager mock_application_manager;
smart_objects::SmartObjectList ptr =
MessageHelper::CreateGlobalPropertiesRequestsToHMI(
@@ -189,6 +196,10 @@ TEST(MessageHelperTestCreate,
(*objPtr)[5][strings::help_prompt] = "666";
(*objPtr)[6][strings::timeout_prompt] = "777";
+ smart_objects::SmartObject user_loc =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ user_loc[rc_rpc_plugin::strings::kGrid] = "[]";
+
EXPECT_CALL(*appSharedMock, vr_help_title())
.Times(AtLeast(3))
.WillRepeatedly(Return(&(*objPtr)[0]));
@@ -211,6 +222,8 @@ TEST(MessageHelperTestCreate,
.Times(AtLeast(2))
.WillRepeatedly(Return(&(*objPtr)[4]));
EXPECT_CALL(*appSharedMock, app_id()).WillRepeatedly(Return(0));
+ EXPECT_CALL(*appSharedMock, get_user_location())
+ .WillRepeatedly(ReturnRef(user_loc));
std::shared_ptr<MockHelpPromptManager> mock_help_prompt_manager =
std::make_shared<MockHelpPromptManager>();
@@ -888,16 +901,46 @@ TEST_F(MessageHelperTest,
}
}
-TEST_F(MessageHelperTest, SubscribeApplicationToSoftButton_CallFromApp) {
- // Create application mock
+TEST_F(
+ MessageHelperTest,
+ SubscribeApplicationToSoftButton_SoftbuttonsAreAbsent_DoesntCallFromApp) {
+ MockApplicationSharedPtr appSharedPtr = std::make_shared<MockApplication>();
+ smart_objects::SmartObject message_params;
+ size_t function_id = 1;
+ WindowSoftButtons window_buttons{
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW, {}};
+
+ EXPECT_CALL(*appSharedPtr,
+ SubscribeToSoftButtons(function_id, window_buttons))
+ .Times(0);
+ MessageHelper::SubscribeApplicationToSoftButton(
+ message_params, appSharedPtr, function_id);
+}
+
+TEST_F(MessageHelperTest,
+ SubscribeApplicationToSoftButton_SoftbuttonsExist_CallFromApp) {
MockApplicationSharedPtr appSharedPtr = std::make_shared<MockApplication>();
- // Prepare data for method
smart_objects::SmartObject message_params;
+ message_params[strings::soft_buttons] =
+ new smart_objects::SmartObject(smart_objects::SmartType_Array);
+ const uint32_t softbutton1 = 1u;
+ const uint32_t softbutton2 = 2u;
+ const uint32_t softbutton3 = 3u;
+ message_params[strings::soft_buttons][0][strings::soft_button_id] =
+ softbutton1;
+ message_params[strings::soft_buttons][1][strings::soft_button_id] =
+ softbutton2;
+ message_params[strings::soft_buttons][2][strings::soft_button_id] =
+ softbutton3;
+
size_t function_id = 1;
- //
+ WindowSoftButtons window_buttons{
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW,
+ {softbutton1, softbutton2, softbutton3}};
+
EXPECT_CALL(*appSharedPtr,
- SubscribeToSoftButtons(function_id, SoftButtonID()))
- .Times(1);
+ SubscribeToSoftButtons(function_id, window_buttons));
+
MessageHelper::SubscribeApplicationToSoftButton(
message_params, appSharedPtr, function_id);
}
diff --git a/src/components/application_manager/test/policy_handler_test.cc b/src/components/application_manager/test/policy_handler_test.cc
index 9142d11199..1d764526b9 100644
--- a/src/components/application_manager/test/policy_handler_test.cc
+++ b/src/components/application_manager/test/policy_handler_test.cc
@@ -72,6 +72,7 @@
#include "policy/mock_policy_manager.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
#include "protocol_handler/mock_session_observer.h"
+#include "utils/test_async_waiter.h"
#include "smart_objects/enum_schema_item.h"
@@ -291,40 +292,6 @@ class PolicyHandlerTest : public ::testing::Test {
}
};
-namespace {
-/**
- * @brief The WaitAsync class
- * can wait for a certain amount of function calls from different
- * threads, or a timeout expires.
- */
-class WaitAsync {
- public:
- WaitAsync(const uint32_t count, const uint32_t timeout)
- : count_(count), timeout_(timeout) {}
-
- void Notify() {
- count_--;
- cond_var_.NotifyOne();
- }
-
- bool Wait(sync_primitives::AutoLock& auto_lock) {
- while (count_ > 0) {
- sync_primitives::ConditionalVariable::WaitStatus wait_status =
- cond_var_.WaitFor(auto_lock, timeout_);
- if (wait_status == sync_primitives::ConditionalVariable::kTimeout) {
- return false;
- }
- }
- return true;
- }
-
- private:
- int count_;
- const uint32_t timeout_;
- sync_primitives::ConditionalVariable cond_var_;
-};
-} // namespace
-
TEST_F(PolicyHandlerTest, LoadPolicyLibrary_Method_ExpectLibraryLoaded) {
// Check before policy enabled from ini file
EXPECT_CALL(policy_settings_, enable_policy()).WillRepeatedly(Return(false));
@@ -2245,24 +2212,20 @@ TEST_F(PolicyHandlerTest,
EXPECT_CALL(*mock_app_, policy_app_id()).WillOnce(Return(kPolicyAppId_));
EXPECT_CALL(*mock_app_, device()).WillOnce(Return(device));
- sync_primitives::Lock wait_hmi_lock_first;
- sync_primitives::AutoLock auto_lock_first(wait_hmi_lock_first);
- WaitAsync waiter_first(kCallsCount_, kTimeout_);
+ auto waiter_first = TestAsyncWaiter::createInstance();
#ifdef EXTERNAL_PROPRIETARY_MODE
EXPECT_CALL(*mock_policy_manager_, SetUserConsentForApp(_, _))
- .WillOnce(NotifyAsync(&waiter_first));
+ .WillOnce(NotifyTestAsyncWaiter(waiter_first));
#else
EXPECT_CALL(*mock_policy_manager_, SetUserConsentForApp(_))
- .WillOnce(NotifyAsync(&waiter_first));
+ .WillOnce(NotifyTestAsyncWaiter(waiter_first));
#endif
ExternalConsentStatusItem item(1u, 1u, kStatusOn);
ExternalConsentStatus external_consent_status;
external_consent_status.insert(item);
#ifdef EXTERNAL_PROPRIETARY_MODE
- sync_primitives::Lock wait_hmi_lock_second;
- sync_primitives::AutoLock auto_lock_second(wait_hmi_lock_second);
- WaitAsync waiter_second(kCallsCount_, kTimeout_);
+ auto waiter_second = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_policy_manager_,
SetExternalConsentStatus(external_consent_status))
@@ -2273,9 +2236,9 @@ TEST_F(PolicyHandlerTest,
policy_handler_.OnAppPermissionConsent(kConnectionKey_, permissions);
#endif
- EXPECT_TRUE(waiter_first.Wait(auto_lock_first));
+ EXPECT_TRUE(waiter_first->WaitFor(kCallsCount_, kTimeout_));
#ifdef EXTERNAL_PROPRIETARY_MODE
- EXPECT_TRUE(waiter_second.Wait(auto_lock_second));
+ EXPECT_TRUE(waiter_second->WaitFor(kCallsCount_, kTimeout_));
#endif
}
@@ -2296,9 +2259,7 @@ TEST_F(PolicyHandlerTest,
permissions.group_permissions.push_back(group_permission_allowed);
- sync_primitives::Lock wait_hmi_lock;
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- WaitAsync waiter(kCallsCount_, kTimeout_);
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(app_manager_, application(_)).Times(0);
@@ -2315,7 +2276,7 @@ TEST_F(PolicyHandlerTest,
policy_handler_.OnAppPermissionConsent(invalid_connection_key, permissions);
#endif
- EXPECT_FALSE(waiter.Wait(auto_lock));
+ EXPECT_FALSE(waiter->WaitFor(kCallsCount_, kTimeout_));
}
TEST_F(PolicyHandlerTest,
@@ -2335,9 +2296,7 @@ TEST_F(PolicyHandlerTest,
permissions.group_permissions.push_back(group_permission_allowed);
- sync_primitives::Lock wait_hmi_lock;
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- WaitAsync waiter(kCallsCount_, kTimeout_);
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(app_manager_, application(_)).Times(0);
@@ -2356,7 +2315,7 @@ TEST_F(PolicyHandlerTest,
policy_handler_.OnAppPermissionConsent(invalid_connection_key, permissions);
#endif
- EXPECT_FALSE(waiter.Wait(auto_lock));
+ EXPECT_FALSE(waiter->WaitFor(kCallsCount_, kTimeout_));
}
ACTION_P(SetDeviceParamsMacAdress, mac_adress) {
@@ -2408,13 +2367,11 @@ TEST_F(PolicyHandlerTest,
ExternalConsentStatus external_consent_status;
external_consent_status.insert(item);
#ifdef EXTERNAL_PROPRIETARY_MODE
- sync_primitives::Lock wait_hmi_lock;
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- WaitAsync waiter(kCallsCount_, kTimeout_);
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_policy_manager_,
SetExternalConsentStatus(external_consent_status))
- .WillOnce(DoAll(NotifyAsync(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
policy_handler_.OnAppPermissionConsent(
invalid_connection_key, permissions, external_consent_status);
#else
@@ -2423,7 +2380,7 @@ TEST_F(PolicyHandlerTest,
Mock::VerifyAndClearExpectations(mock_app_.get());
#ifdef EXTERNAL_PROPRIETARY_MODE
- EXPECT_TRUE(waiter.Wait(auto_lock));
+ EXPECT_TRUE(waiter->WaitFor(kCallsCount_, kTimeout_));
#endif
}
@@ -2472,9 +2429,7 @@ TEST_F(PolicyHandlerTest,
ExternalConsentStatus external_consent_status;
external_consent_status.insert(item);
#ifdef EXTERNAL_PROPRIETARY_MODE
- sync_primitives::Lock wait_hmi_lock;
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- WaitAsync waiter(kCallsCount_, kTimeout_);
+ auto waiter = TestAsyncWaiter::createInstance();
ON_CALL(*mock_policy_manager_, IsNeedToUpdateExternalConsentStatus(_))
.WillByDefault(Return(false));
@@ -2489,7 +2444,7 @@ TEST_F(PolicyHandlerTest,
Mock::VerifyAndClearExpectations(mock_app_.get());
#ifdef EXTERNAL_PROPRIETARY_MODE
- EXPECT_FALSE(waiter.Wait(auto_lock));
+ EXPECT_FALSE(waiter->WaitFor(kCallsCount_, kTimeout_));
#endif
}
@@ -2540,37 +2495,33 @@ TEST_F(PolicyHandlerTest, AddStatisticsInfo_UnknownStatistics_UNSUCCESS) {
TEST_F(PolicyHandlerTest, AddStatisticsInfo_SUCCESS) {
EnablePolicyAndPolicyManagerMock();
- sync_primitives::Lock wait_hmi_lock;
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- WaitAsync waiter(kCallsCount_, kTimeout_);
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_policy_manager_, Increment(_))
- .WillOnce(NotifyAsync(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
policy_handler_.AddStatisticsInfo(
hmi_apis::Common_StatisticsType::iAPP_BUFFER_FULL);
- EXPECT_TRUE(waiter.Wait(auto_lock));
+ EXPECT_TRUE(waiter->WaitFor(kCallsCount_, kTimeout_));
}
TEST_F(PolicyHandlerTest, OnSystemError_SUCCESS) {
EnablePolicyAndPolicyManagerMock();
- sync_primitives::Lock wait_hmi_lock;
- sync_primitives::AutoLock auto_lock(wait_hmi_lock);
- WaitAsync waiter(kCallsCount_, kTimeout_);
+ auto waiter_first = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_policy_manager_, Increment(_))
- .WillOnce(NotifyAsync(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter_first));
policy_handler_.OnSystemError(hmi_apis::Common_SystemError::SYNC_REBOOTED);
- EXPECT_TRUE(waiter.Wait(auto_lock));
+ EXPECT_TRUE(waiter_first->WaitFor(kCallsCount_, kTimeout_));
- WaitAsync waiter1(kCallsCount_, kTimeout_);
- EXPECT_CALL(*mock_policy_manager_, Increment(_))
- .WillOnce(NotifyAsync(&waiter1));
+ auto waiter_second = TestAsyncWaiter::createInstance();
+ EXPECT_CALL(*mock_policy_manager_, Increment(_))
+ .WillOnce(NotifyTestAsyncWaiter(waiter_second));
policy_handler_.OnSystemError(
hmi_apis::Common_SystemError::SYNC_OUT_OF_MEMMORY);
- EXPECT_TRUE(waiter1.Wait(auto_lock));
+ EXPECT_TRUE(waiter_second->WaitFor(kCallsCount_, kTimeout_));
}
TEST_F(PolicyHandlerTest, RemoteAppsUrl_EndpointsEmpty_UNSUCCESS) {
diff --git a/src/components/application_manager/test/request_controller/request_controller_test.cc b/src/components/application_manager/test/request_controller/request_controller_test.cc
index 71e12b2825..992bf8e303 100644
--- a/src/components/application_manager/test/request_controller/request_controller_test.cc
+++ b/src/components/application_manager/test/request_controller/request_controller_test.cc
@@ -162,35 +162,35 @@ class RequestControllerTestClass : public ::testing::Test {
TEST_F(RequestControllerTestClass,
AddMobileRequest_DuplicateCorrelationId_INVALID_ID) {
RequestPtr request_valid = GetMockRequest();
- TestAsyncWaiter waiter_valid;
+ auto waiter_valid = TestAsyncWaiter::createInstance();
ON_CALL(*request_valid, default_timeout()).WillByDefault(Return(0));
EXPECT_CALL(*request_valid, Init()).WillOnce(Return(true));
EXPECT_CALL(*request_valid, Run())
.Times(1)
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter_valid));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter_valid));
EXPECT_EQ(RequestController::SUCCESS,
AddRequest(default_settings_,
request_valid,
RequestInfo::RequestType::MobileRequest,
mobile_apis::HMILevel::HMI_NONE));
- EXPECT_TRUE(waiter_valid.WaitFor(1, 1000));
+ EXPECT_TRUE(waiter_valid->WaitFor(1, 1000));
// The command should not be run if another command with the same
// correlation_id is waiting for a response
RequestPtr request_dup_corr_id = GetMockRequest();
- TestAsyncWaiter waiter_dup;
+ auto waiter_dup = TestAsyncWaiter::createInstance();
ON_CALL(*request_dup_corr_id, default_timeout()).WillByDefault(Return(0));
EXPECT_CALL(*request_dup_corr_id, Init()).WillOnce(Return(true));
ON_CALL(*request_dup_corr_id, Run())
- .WillByDefault(NotifyTestAsyncWaiter(&waiter_dup));
+ .WillByDefault(NotifyTestAsyncWaiter(waiter_dup));
EXPECT_EQ(RequestController::SUCCESS,
AddRequest(default_settings_,
request_dup_corr_id,
RequestInfo::RequestType::MobileRequest,
mobile_apis::HMILevel::HMI_NONE));
- EXPECT_FALSE(waiter_dup.WaitFor(1, 1000));
+ EXPECT_FALSE(waiter_dup->WaitFor(1, 1000));
}
TEST_F(RequestControllerTestClass,
@@ -282,17 +282,17 @@ TEST_F(RequestControllerTestClass, OnTimer_SUCCESS) {
RequestPtr mock_request = GetMockRequest(
kDefaultCorrelationID, kDefaultConnectionKey, request_timeout);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_EQ(RequestController::SUCCESS,
AddRequest(default_settings_,
mock_request,
RequestInfo::RequestType::MobileRequest));
EXPECT_CALL(*mock_request, onTimeOut())
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
// Waiting for call of `onTimeOut` for `kTimeScale` seconds
- EXPECT_TRUE(waiter.WaitFor(1, kTimeScale));
+ EXPECT_TRUE(waiter->WaitFor(1, kTimeScale));
}
} // namespace request_controller_test
diff --git a/src/components/application_manager/test/resumption/resumption_data_test.cc b/src/components/application_manager/test/resumption/resumption_data_test.cc
index d5228934db..a416cbbad5 100644
--- a/src/components/application_manager/test/resumption/resumption_data_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_test.cc
@@ -437,6 +437,8 @@ void ResumptionDataTest::PrepareData() {
ON_CALL(*app_mock, getAppFiles()).WillByDefault(ReturnRef(app_files_map_));
ON_CALL(*app_mock, window_optional_params_map())
.WillByDefault(Return(window_params_map));
+ ON_CALL(*app_mock, get_user_location())
+ .WillByDefault(ReturnRef(user_location_));
}
void ResumptionDataTest::SetDefaultCurrentHmiState() {
diff --git a/src/components/application_manager/test/resumption_sql_queries_test.cc b/src/components/application_manager/test/resumption_sql_queries_test.cc
index 61490ae4af..f31d8f8e28 100644
--- a/src/components/application_manager/test/resumption_sql_queries_test.cc
+++ b/src/components/application_manager/test/resumption_sql_queries_test.cc
@@ -81,6 +81,7 @@ const string kDeleteData =
"DELETE FROM `applicationSubMenuArray`; "
"DELETE FROM `applicationSubscriptionsArray`; "
"DELETE FROM `_internal_data`; "
+ "DELETE FROM `applicationUserLocation`;"
"COMMIT; "
"VACUUM;";
@@ -329,6 +330,7 @@ class ResumptionSqlQueriesTest : public ::testing::Test {
db_schema.push_back("applicationSubMenuArray");
db_schema.push_back("applicationSubscriptionsArray");
db_schema.push_back("_internal_data");
+ db_schema.push_back("applicationUserLocation");
std::sort(db_schema.begin(), db_schema.end());
}
};
diff --git a/src/components/application_manager/test/rpc_passing_handler_test.cc b/src/components/application_manager/test/rpc_passing_handler_test.cc
index 6eac6ca0b1..4e7f401646 100644
--- a/src/components/application_manager/test/rpc_passing_handler_test.cc
+++ b/src/components/application_manager/test/rpc_passing_handler_test.cc
@@ -390,7 +390,7 @@ TEST_F(RPCPassingHandlerTest,
TEST_F(RPCPassingHandlerTest, RPCPassingTest_REQUEST_Timeout) {
uint32_t timeout_in_ms = 4;
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
app_services_.push_back(CreateAppService(
kConnectionKey_NAV_ASP, "Navigation service", "NAVIGATION"));
diff --git a/src/components/application_manager/test/sdl_preloaded_pt.json b/src/components/application_manager/test/sdl_preloaded_pt.json
deleted file mode 100644
index 536a0939f9..0000000000
--- a/src/components/application_manager/test/sdl_preloaded_pt.json
+++ /dev/null
@@ -1,1979 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-02-12",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 70,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "PROJECTION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- },
- "subtle_notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 20,
- "PROJECTION": 20,
- "VOICECOM": 30,
- "COMMUNICATION": 15,
- "NORMAL": 10,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus",
- "stabilityControlsStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus",
- "stabilityControlsStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus",
- "stabilityControlsStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus",
- "stabilityControlsStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": ["HTTP"]
- }
- }
- }
- }
diff --git a/src/components/connection_handler/test/connection_handler_impl_test.cc b/src/components/connection_handler/test/connection_handler_impl_test.cc
index 87dac9182e..1e66454ce7 100644
--- a/src/components/connection_handler/test/connection_handler_impl_test.cc
+++ b/src/components/connection_handler/test/connection_handler_impl_test.cc
@@ -1045,34 +1045,34 @@ TEST_F(ConnectionHandlerTest, CloseSessionWithCommonReason) {
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_protocol_handler_,
SendEndSession(uid_, out_context_.new_session_id_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
InSequence seq;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kMobileNav, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kAudio, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kBulk, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kRpc, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
connection_handler_->CloseSession(connection_key_, kCommon);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ConnectionHandlerTest, CloseSessionWithFloodReason) {
@@ -1087,34 +1087,34 @@ TEST_F(ConnectionHandlerTest, CloseSessionWithFloodReason) {
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_protocol_handler_,
SendEndSession(uid_, out_context_.new_session_id_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
InSequence seq;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kMobileNav, kFlood))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kAudio, kFlood))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kBulk, kFlood))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kRpc, kFlood))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
connection_handler_->CloseSession(connection_key_, kFlood);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ConnectionHandlerTest, CloseSessionWithMalformedMessage) {
@@ -1129,7 +1129,7 @@ TEST_F(ConnectionHandlerTest, CloseSessionWithMalformedMessage) {
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_protocol_handler_,
SendEndSession(uid_, out_context_.new_session_id_))
@@ -1138,24 +1138,24 @@ TEST_F(ConnectionHandlerTest, CloseSessionWithMalformedMessage) {
InSequence seq;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kMobileNav, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kAudio, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kBulk, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kRpc, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
connection_handler_->CloseSession(connection_key_, kMalformed);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ConnectionHandlerTest, CloseConnectionSessionsWithMalformedMessage) {
@@ -1170,7 +1170,7 @@ TEST_F(ConnectionHandlerTest, CloseConnectionSessionsWithMalformedMessage) {
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_protocol_handler_,
SendEndSession(uid_, out_context_.new_session_id_))
@@ -1179,24 +1179,24 @@ TEST_F(ConnectionHandlerTest, CloseConnectionSessionsWithMalformedMessage) {
InSequence seq;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kMobileNav, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kAudio, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kBulk, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kRpc, kMalformed))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
connection_handler_->CloseConnectionSessions(uid_, kMalformed);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ConnectionHandlerTest, CloseConnectionSessionsInvalidConnectionId) {
@@ -1229,34 +1229,34 @@ TEST_F(ConnectionHandlerTest, CloseConnectionSessionsWithCommonReason) {
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_protocol_handler_,
SendEndSession(uid_, out_context_.new_session_id_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
InSequence seq;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kMobileNav, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kAudio, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kBulk, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceEndedCallback(connection_key_, kRpc, kCommon))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
connection_handler_->CloseConnectionSessions(uid_, kCommon);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ConnectionHandlerTest, StartService_withServices) {
diff --git a/src/components/connection_handler/test/heart_beat_monitor_test.cc b/src/components/connection_handler/test/heart_beat_monitor_test.cc
index d736255134..2ca8a46184 100644
--- a/src/components/connection_handler/test/heart_beat_monitor_test.cc
+++ b/src/components/connection_handler/test/heart_beat_monitor_test.cc
@@ -123,19 +123,19 @@ TEST_F(HeartBeatMonitorTest, TimerElapsed) {
const uint32_t session = connection_->AddNewSession(kDefaultConnectionHandle);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(connection_handler_mock_, CloseSession(_, session, _))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter),
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter),
RemoveSession(connection_, session)));
times++;
EXPECT_CALL(connection_handler_mock_, SendHeartBeat(_, session))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
connection_->StartHeartBeat(session);
- EXPECT_TRUE(waiter.WaitFor(
+ EXPECT_TRUE(waiter->WaitFor(
times,
2 * timeout_ * MICROSECONDS_IN_MILLISECONDS + MICROSECONDS_IN_SECOND));
}
@@ -166,13 +166,13 @@ TEST_F(HeartBeatMonitorTest, NotKeptAlive) {
const uint32_t session = connection_->AddNewSession(kDefaultConnectionHandle);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(connection_handler_mock_, SendHeartBeat(_, session))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(connection_handler_mock_, CloseSession(_, session, _))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter),
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter),
RemoveSession(connection_, session)));
times++;
@@ -180,7 +180,7 @@ TEST_F(HeartBeatMonitorTest, NotKeptAlive) {
usleep(timeout_);
connection_->KeepAlive(session);
- EXPECT_TRUE(waiter.WaitFor(
+ EXPECT_TRUE(waiter->WaitFor(
times,
2 * timeout_ * MICROSECONDS_IN_MILLISECONDS + MICROSECONDS_IN_SECOND));
}
@@ -203,28 +203,28 @@ TEST_F(HeartBeatMonitorTest, TwoSessionsElapsed) {
const uint32_t kSession2 =
connection_->AddNewSession(kAnotherConnectionHandle);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(connection_handler_mock_, CloseSession(_, kSession1, _))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter),
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter),
RemoveSession(connection_, kSession1)));
times++;
EXPECT_CALL(connection_handler_mock_, CloseSession(_, kSession2, _))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter),
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter),
RemoveSession(connection_, kSession2)));
times++;
EXPECT_CALL(connection_handler_mock_, SendHeartBeat(_, kSession1))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(connection_handler_mock_, SendHeartBeat(_, kSession2))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
connection_->StartHeartBeat(kSession1);
connection_->StartHeartBeat(kSession2);
- EXPECT_TRUE(waiter.WaitFor(
+ EXPECT_TRUE(waiter->WaitFor(
times,
2 * timeout_ * MICROSECONDS_IN_MILLISECONDS + MICROSECONDS_IN_SECOND));
}
@@ -256,21 +256,21 @@ TEST_F(HeartBeatMonitorTest, DecreaseHeartBeatTimeout) {
const uint32_t kSession =
connection_->AddNewSession(kDefaultConnectionHandle);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(connection_handler_mock_, CloseSession(_, kSession, _))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter),
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter),
RemoveSession(connection_, kSession)));
times++;
EXPECT_CALL(connection_handler_mock_, SendHeartBeat(_, kSession))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
const uint32_t new_timeout = timeout_ - kTime_offset;
connection_->StartHeartBeat(kSession);
connection_->SetHeartBeatTimeout(new_timeout, kSession);
- EXPECT_TRUE(waiter.WaitFor(
+ EXPECT_TRUE(waiter->WaitFor(
times,
2 * timeout_ * MICROSECONDS_IN_MILLISECONDS + MICROSECONDS_IN_SECOND));
}
diff --git a/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc b/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc
index c9ad49efed..a750bc236b 100644
--- a/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc
+++ b/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc
@@ -175,11 +175,11 @@ TEST_F(HMIMessageHandlerImplTest, OnMessageReceived_InvalidObserver_Cancelled) {
TEST_F(HMIMessageHandlerImplTest, SendMessageToHMI_Success) {
hmi_message_handler::MessageSharedPointer message = CreateMessage();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
MockHMIMessageAdapterImpl message_adapter(hmi_handler_);
EXPECT_CALL(message_adapter, SendMessageToHMI(message))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
hmi_handler_->AddHMIMessageAdapter(&message_adapter);
hmi_handler_->SendMessageToHMI(message);
@@ -187,7 +187,7 @@ TEST_F(HMIMessageHandlerImplTest, SendMessageToHMI_Success) {
// Wait for the message to be processed
hmi_handler_->messages_to_hmi()->WaitDumpQueue();
- EXPECT_TRUE(waiter.WaitFor(1, 100));
+ EXPECT_TRUE(waiter->WaitFor(1, 100));
}
TEST(WebsocketSessionTest, SendMessage_UnpreparedConnection_WithoutFall) {
diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h
index dc4d1e8ffe..ae9344634c 100644
--- a/src/components/include/application_manager/application_manager.h
+++ b/src/components/include/application_manager/application_manager.h
@@ -940,6 +940,14 @@ class ApplicationManager {
virtual bool IsSOStructValid(
const hmi_apis::StructIdentifiers::eType struct_id,
const smart_objects::SmartObject& display_capabilities) = 0;
+
+ /**
+ * @brief Unsubscribe application specified in message from softbuttons.
+ * @param response_message - Response message received from HMI.
+ * @return bool - Result of unsubscribing process.
+ */
+ virtual bool UnsubscribeAppFromSoftButtons(
+ const commands::MessageSharedPtr response_message) = 0;
};
} // namespace application_manager
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 57d3b8f7ad..6a035a01d1 100644
--- a/src/components/include/test/application_manager/mock_application_manager.h
+++ b/src/components/include/test/application_manager/mock_application_manager.h
@@ -351,6 +351,9 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD2(IsSOStructValid,
bool(const hmi_apis::StructIdentifiers::eType struct_id,
const smart_objects::SmartObject& display_capabilities));
+ MOCK_METHOD1(UnsubscribeAppFromSoftButtons,
+ bool(const application_manager::commands::MessageSharedPtr
+ response_message));
MOCK_CONST_METHOD1(IsAppSubscribedForWayPoints, bool(uint32_t));
MOCK_CONST_METHOD1(IsAppSubscribedForWayPoints,
bool(application_manager::Application& app));
diff --git a/src/components/include/test/utils/test_async_waiter.h b/src/components/include/test/utils/test_async_waiter.h
index 12d6cd04b7..6ad9ca12c5 100644
--- a/src/components/include/test/utils/test_async_waiter.h
+++ b/src/components/include/test/utils/test_async_waiter.h
@@ -48,17 +48,15 @@ namespace test {
*
* Usage example:
* TEST() {
- * TestAsyncWaiter waiter;
+ * auto waiter = TestAsyncWaiter::createInstance();
* EXPECT_CALL(mock, InterestingCall())
* .Times(n)
- * .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
- * EXPECT_TRUE(waiter.WaitFor(n, 1000));
+ * .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
+ * EXPECT_TRUE(waiter->WaitFor(n, 1000));
* }
*/
class TestAsyncWaiter {
public:
- TestAsyncWaiter() : notified_(false), count_(0), lock_(), cond_var_() {}
-
/**
* @brief WaitFor
* Waits for specified number of notifications but not longer
@@ -80,6 +78,10 @@ class TestAsyncWaiter {
return true;
}
+ static std::shared_ptr<TestAsyncWaiter> createInstance() {
+ return std::shared_ptr<TestAsyncWaiter>(new TestAsyncWaiter());
+ }
+
/**
* @brief Notify
* Notifies async waiter
@@ -92,6 +94,8 @@ class TestAsyncWaiter {
}
private:
+ TestAsyncWaiter() : notified_(false), count_(0), lock_(), cond_var_() {}
+
bool notified_;
uint32_t count_;
sync_primitives::Lock lock_;
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 6ec966925d..6256cd747b 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -634,6 +634,12 @@
<element name="phoneNumber">
<description> Optional phone number of intended location / establishment (if applicable) for SendLocation.</description>
</element>
+ <element name="timeToDestination">
+ <description>Optional time to destination field for ShowConstantTBT</description>
+ </element>
+ <element name="turnText">
+ <description>Turn text for turnList parameter of UpdateTurnList</description>
+ </element>
<element name="subtleAlertText1">
<description>The first line of the subtle alert text field; applies to `SubtleAlert` `alertText1`</description>
</element>
@@ -643,15 +649,6 @@
<element name="subtleAlertSoftButtonText">
<description>A text field in the soft button of a subtle alert; applies to `SubtleAlert` `softButtons`</description>
</element>
- <element name="timeToDestination"/>
- <!-- TO DO to be removed -->
- <element name="turnText"/>
- <element name="navigationText">
- <description>Navigation text for UpdateTurnList.</description>
- </element>
- <element name="notificationText">
- <description>Text of notification to be displayed on screen.</description>
- </element>
</enum>
<enum name="MetadataType">
@@ -1208,6 +1205,7 @@
<element name="VEHICLEDATA_FUELLEVEL_STATE" />
<element name="VEHICLEDATA_FUELCONSUMPTION" />
<element name="VEHICLEDATA_EXTERNTEMP" />
+ <element name="VEHICLEDATA_CLIMATEDATA"/>
<element name="VEHICLEDATA_VIN" />
<element name="VEHICLEDATA_GEARSTATUS" />
<element name="VEHICLEDATA_PRNDL" />
@@ -1237,6 +1235,7 @@
<element name="VEHICLEDATA_STABILITYCONTROLSSTATUS" />
<element name="VEHICLEDATA_WINDOWSTATUS"/>
<element name="VEHICLEDATA_HANDSOFFSTEERING"/>
+ <element name="VEHICLEDATA_SEATOCCUPANCY"/>
</enum>
<enum name="WiperStatus">
@@ -1790,7 +1789,7 @@
<struct name="SeatLocation">
<description>Describes the location of a seat.</description>
- <param name="grid" type="Grid" mandatory="false">
+ <param name="grid" type="Common.Grid" mandatory="false">
</param>
</struct>
@@ -1805,6 +1804,21 @@
</param>
</struct>
+<struct name="SeatStatus">
+ <description>Describes the status of a parameter of seat.</description>
+ <param name="seatLocation" type="Common.SeatLocation" mandatory="true"/>
+ <param name="conditionActive" type="Boolean" mandatory="true"/>
+</struct>
+
+<struct name="SeatOccupancy">
+ <param name="seatsOccupied" type="Common.SeatStatus" array="true" minsize="0" maxsize="100" mandatory="false">
+ <description>Seat status array containing location and whether the seats are occupied.</description>
+ </param>
+ <param name="seatsBelted" type="Common.SeatStatus" array="true" minsize="0" maxsize="100" mandatory="false">
+ <description>Seat status array containing location and whether the seats are belted.</description>
+ </param>
+</struct>
+
<enum name="ModuleType">
<element name="CLIMATE"/>
<element name="RADIO"/>
@@ -2225,7 +2239,7 @@
</enum>
<struct name="Temperature">
- <param name="unit" type="TemperatureUnit" mandatory="true" >
+ <param name="unit" type="Common.TemperatureUnit" mandatory="true" >
<description>Temperature Unit</description>
</param>
<param name="value" type="Float" mandatory="true" >
@@ -3172,7 +3186,7 @@
<struct name="Turn">
<param name="navigationText" type="Common.TextFieldStruct" mandatory="false">
- <description>Uses navigationText from TextFieldStruct.</description>
+ <description>Describes the `Turn` using `TextFieldName` `turnText`</description>
</param>
<param name="turnIcon" type="Common.Image" mandatory="false">
</param>
@@ -3643,6 +3657,9 @@
<param name="scale" type="Float" minvalue="1" maxvalue="10" mandatory="false">
<description>The scaling factor the app should use to change the size of the projecting view.</description>
</param>
+ <param name="preferredFPS" type="Integer" minvalue="0" maxvalue="2147483647" mandatory="false">
+ <description>The preferred frame rate per second of the head unit. The mobile application / app library may take other factors into account that constrain the frame rate lower than this value, but it should not perform streaming at a higher frame rate than this value.</description>
+ </param>
</struct>
<struct name="DynamicUpdateCapabilities">
@@ -4337,6 +4354,18 @@
</param>
</struct>
+ <struct name="ClimateData">
+ <param name="externalTemperature" type="Common.Temperature" mandatory="false">
+ <description>The external temperature in degrees celsius</description>
+ </param>
+ <param name="cabinTemperature" type="Common.Temperature" mandatory="false">
+ <description>Internal ambient cabin temperature in degrees celsius</description>
+ </param>
+ <param name="atmosphericPressure" type="Float" minvalue="0" maxvalue="2000" mandatory="false">
+ <description>Current atmospheric pressure in mBar</description>
+ </param>
+ </struct>
+
<struct name="GearStatus">
<param name="userSelectedGear" type="Common.PRNDL" mandatory="false">
<description>Gear position selected by the user i.e. Park, Drive, Reverse</description>
@@ -6298,6 +6327,9 @@
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="climateData" type="Boolean" mandatory="false">
+ <description>See ClimateData</description>
+ </param>
<param name="turnSignal" type="Boolean" mandatory="false">
<description>See TurnSignal</description>
</param>
@@ -6358,6 +6390,9 @@
<param name="handsOffSteering" type="Boolean" mandatory="false">
<description>To indicate whether driver hands are off the steering wheel</description>
</param>
+ <param name="seatOccupancy" type="Boolean" mandatory="false">
+ <description>See SeatOccupancy</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -6406,6 +6441,9 @@
<param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius.</description>
</param>
+ <param name="climateData" type="Common.VehicleDataResult" mandatory="false">
+ <description>See ClimateData</description>
+ </param>
<param name="turnSignal" type="Common.VehicleDataResult" mandatory="false">
<description>See TurnSignal</description>
</param>
@@ -6466,6 +6504,9 @@
<param name="handsOffSteering" type="Common.VehicleDataResult" mandatory="false">
<description>To indicate whether driver hands are off the steering wheel</description>
</param>
+ <param name="seatOccupancy" type="Common.VehicleDataResult" mandatory="false">
+ <description>See SeatOccupancy</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
@@ -6517,6 +6558,9 @@
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius.</description>
</param>
+ <param name="climateData" type="Boolean" mandatory="false">
+ <description>See ClimateData</description>
+ </param>
<param name="turnSignal" type="Boolean" mandatory="false">
<description>See TurnSignal</description>
</param>
@@ -6577,6 +6621,9 @@
<param name="handsOffSteering" type="Boolean" mandatory="false">
<description>To indicate whether driver hands are off the steering wheel</description>
</param>
+ <param name="seatOccupancy" type="Boolean" mandatory="false">
+ <description>See SeatOccupancy</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -6625,6 +6672,9 @@
<param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="climateData" type="Common.VehicleDataResult" mandatory="false">
+ <description>See ClimateData</description>
+ </param>
<param name="turnSignal" type="Common.VehicleDataResult" mandatory="false">
<description>See TurnSignal</description>
</param>
@@ -6685,6 +6735,9 @@
<param name="handsOffSteering" type="Common.VehicleDataResult" mandatory="false">
<description>To indicate whether driver hands are off the steering wheel</description>
</param>
+ <param name="seatOccupancy" type="Common.VehicleDataResult" mandatory="false">
+ <description>See SeatOccupancy</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
@@ -6734,6 +6787,9 @@
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="climateData" type="Boolean" mandatory="false">
+ <description>See ClimateData</description>
+ </param>
<param name="turnSignal" type="Boolean" mandatory="false">
<description>See TurnSignal</description>
</param>
@@ -6797,6 +6853,9 @@
<param name="handsOffSteering" type="Boolean" mandatory="false">
<description>To indicate whether driver hands are off the steering wheel</description>
</param>
+ <param name="seatOccupancy" type="Boolean" mandatory="false">
+ <description>See SeatOccupancy</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -6845,6 +6904,9 @@
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="climateData" type="Common.ClimateData" mandatory="false">
+ <description>See ClimateData</description>
+ </param>
<param name="turnSignal" type="Common.TurnSignal" mandatory="false">
<description>See TurnSignal</description>
</param>
@@ -6908,6 +6970,9 @@
<param name="handsOffSteering" type="Boolean" mandatory="false">
<description>To indicate whether driver hands are off the steering wheel</description>
</param>
+ <param name="seatOccupancy" type="Common.SeatOccupancy" mandatory="false">
+ <description>See SeatOccupancy</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
@@ -6957,6 +7022,9 @@
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
+ <param name="climateData" type="Common.ClimateData" mandatory="false">
+ <description>See ClimateData</description>
+ </param>
<param name="turnSignal" type="Common.TurnSignal" mandatory="false">
<description>See TurnSignal</description>
</param>
@@ -7020,6 +7088,9 @@
<param name="handsOffSteering" type="Boolean" mandatory="false">
<description>To indicate whether driver hands are off the steering wheel</description>
</param>
+ <param name="seatOccupancy" type="Common.SeatOccupancy" mandatory="false">
+ <description>See SeatOccupancy</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
diff --git a/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml b/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
index 08da927fa9..a3b91abbc5 100644
--- a/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
+++ b/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
@@ -25,6 +25,7 @@
<element name="gps" />
<element name="speed" />
<element name="engineTorque" />
+ <element name="climateData" />
<element name="externalTemperature" />
<element name="turnSignal" />
<element name="fuelLevel" />
@@ -60,6 +61,7 @@
<element name="tpms" />
<element name="cloudAppVehicleID" />
<element name="handsOffSteering" />
+ <element name="seatOccupancy" />
</enum>
<enum name="AppHMIType">
diff --git a/src/components/policy/policy_external/test/update_status_manager_test.cc b/src/components/policy/policy_external/test/update_status_manager_test.cc
index 29952bd18e..c5b8f78c77 100644
--- a/src/components/policy/policy_external/test/update_status_manager_test.cc
+++ b/src/components/policy/policy_external/test/update_status_manager_test.cc
@@ -37,6 +37,7 @@
#include "policy/policy_manager_impl.h"
#include "utils/conditional_variable.h"
+#include "utils/test_async_waiter.h"
namespace test {
namespace components {
@@ -78,44 +79,6 @@ class UpdateStatusManagerTest : public ::testing::Test {
void TearDown() OVERRIDE {}
};
-namespace {
-/**
- * @brief The WaitAsync class
- * can wait for a certain amount of function calls from different
- * threads, or a timeout expires.
- */
-class WaitAsync {
- public:
- WaitAsync(const uint32_t count, const uint32_t timeout)
- : count_(count), timeout_(timeout) {}
-
- void Notify() {
- count_--;
- cond_var_.NotifyOne();
- }
-
- bool Wait(sync_primitives::AutoLock& auto_lock) {
- while (count_ > 0) {
- sync_primitives::ConditionalVariable::WaitStatus wait_status =
- cond_var_.WaitFor(auto_lock, timeout_);
- if (wait_status == sync_primitives::ConditionalVariable::kTimeout) {
- return false;
- }
- }
- return true;
- }
-
- private:
- int count_;
- const uint32_t timeout_;
- sync_primitives::ConditionalVariable cond_var_;
-};
-} // namespace
-
-ACTION_P(NotifyAsync, waiter) {
- waiter->Notify();
-}
-
ACTION_P2(RetryFailed, manager, listener) {
manager->OnResetRetrySequence();
listener->OnPTUFinished(false);
@@ -124,18 +87,17 @@ ACTION_P2(RetryFailed, manager, listener) {
TEST_F(UpdateStatusManagerTest,
OnUpdateSentOut_WaitForTimeoutExpired_ExpectStatusUpdateNeeded) {
// Arrange
- sync_primitives::Lock lock;
- sync_primitives::AutoLock auto_lock(lock);
const uint32_t count = 3u;
const uint32_t timeout = 2u * k_timeout_;
- WaitAsync waiter(count, timeout);
+ auto waiter = TestAsyncWaiter::createInstance();
+
EXPECT_CALL(listener_, OnUpdateStatusChanged(_))
- .WillRepeatedly(NotifyAsync(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
manager_->ScheduleUpdate();
manager_->OnUpdateSentOut(k_timeout_);
status_ = manager_->GetLastUpdateStatus();
EXPECT_EQ(StatusUpdatePending, status_);
- EXPECT_TRUE(waiter.Wait(auto_lock));
+ EXPECT_TRUE(waiter->WaitFor(count, timeout));
status_ = manager_->GetLastUpdateStatus();
// Check
EXPECT_EQ(StatusUpdateRequired, status_);
@@ -148,9 +110,9 @@ TEST_F(
sync_primitives::AutoLock auto_lock(lock);
const uint32_t count = 3u;
const uint32_t timeout = 2u * k_timeout_;
- WaitAsync waiter(count, timeout);
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(listener_, OnUpdateStatusChanged(_))
- .WillRepeatedly(NotifyAsync(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
EXPECT_CALL(mock_ptu_retry_handler_, RetrySequenceFailed())
.WillOnce(RetryFailed(manager_, &listener_));
manager_->ScheduleUpdate();
@@ -167,7 +129,7 @@ TEST_F(
EXPECT_CALL(listener_, OnPTUFinished(false));
}
EXPECT_EQ(StatusUpdatePending, status_);
- EXPECT_TRUE(waiter.Wait(auto_lock));
+ EXPECT_TRUE(waiter->WaitFor(count, timeout));
status_ = manager_->GetLastUpdateStatus();
// Check
EXPECT_EQ(StatusUpdateRequired, status_);
diff --git a/src/components/protocol_handler/test/protocol_handler_tm_test.cc b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
index f8b6de9548..7cf1878c5f 100644
--- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc
+++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
@@ -242,6 +242,7 @@ class ProtocolHandlerImplTest : public ::testing::Test {
const_cast<protocol_handler::impl::ToMobileQueue&>(
protocol_handler_impl->get_to_mobile_queue())
.WaitDumpQueue();
+ protocol_handler_impl->Stop();
}
// Emulate connection establish
@@ -272,7 +273,7 @@ class ProtocolHandlerImplTest : public ::testing::Test {
void AddSession(const std::shared_ptr<TestAsyncWaiter>& waiter,
uint32_t& times) {
using namespace protocol_handler;
- ASSERT_TRUE(NULL != waiter.get());
+ ASSERT_TRUE(NULL != waiter);
AddConnection();
const ServiceType start_service = kRpc;
@@ -548,7 +549,7 @@ TEST_F(ProtocolHandlerImplTest,
const int call_times = 5;
AddConnection();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
ServiceType service_type;
// Expect verification of allowed transport
@@ -581,7 +582,7 @@ TEST_F(ProtocolHandlerImplTest,
.
// Return sessions start rejection
WillRepeatedly(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
SaveArg<2>(&service_type),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
@@ -605,7 +606,7 @@ TEST_F(ProtocolHandlerImplTest,
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
.Times(call_times)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times += call_times;
SendControlMessage(
@@ -619,7 +620,7 @@ TEST_F(ProtocolHandlerImplTest,
SendControlMessage(
PROTECTION_OFF, kBulk, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send NAck on session_observer rejection
@@ -640,7 +641,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
const bool callback_protection_flag = PROTECTION_OFF;
#endif // ENABLE_SECURITY
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
ServiceType service_type;
// Expect verification of allowed transport
@@ -673,7 +674,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
.
// Return sessions start rejection
WillRepeatedly(DoAll(
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
SaveArg<2>(&service_type),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
@@ -697,7 +698,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
.Times(call_times)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times += call_times;
SendControlMessage(
@@ -711,7 +712,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
SendControlMessage(
PROTECTION_ON, kBulk, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack on session_observer accept
@@ -723,7 +724,7 @@ TEST_F(ProtocolHandlerImplTest,
AddConnection();
const ServiceType start_service = kRpc;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -750,7 +751,7 @@ TEST_F(ProtocolHandlerImplTest,
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
@@ -768,13 +769,13 @@ TEST_F(ProtocolHandlerImplTest,
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_OFF, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack on session_observer accept
@@ -785,7 +786,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverAccept) {
SetProtocolVersion2();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -853,7 +854,7 @@ TEST_F(ProtocolHandlerImplTest,
std::string("BTMAC")),
connection_id2);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
@@ -896,7 +897,7 @@ TEST_F(ProtocolHandlerImplTest,
An<const BsonObject*>()))
// don't call NotifySessionStartedContext() immediately, instead call it
// after second OnSessionStartedCallback()
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
BsonObject bson_params2;
@@ -922,7 +923,7 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
An<const BsonObject*>()))
.WillOnce(DoAll(
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id2,
@@ -964,7 +965,7 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
connection_id1,
Eq(ack_params))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
BsonArray bson_arr;
@@ -986,7 +987,7 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
connection_id2,
Eq(nack_params))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendTMMessage(connection_id1,
@@ -1011,7 +1012,7 @@ TEST_F(ProtocolHandlerImplTest,
message_id,
params2.size() > 0 ? &params2[0] : NULL);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
bson_object_deinitialize(&bson_params1);
bson_object_deinitialize(&bson_params2);
@@ -1026,7 +1027,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Audio_RejectByTransportType) {
AddConnection();
const ServiceType start_service = kAudio;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -1050,13 +1051,13 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Audio_RejectByTransportType) {
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_OFF, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
@@ -1068,7 +1069,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Video_RejectByTransportType) {
AddConnection();
const ServiceType start_service = kMobileNav;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -1093,13 +1094,13 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Video_RejectByTransportType) {
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_OFF, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
// TODO(EZamakhov): add test for get_hash_id/set_hash_id from
@@ -1108,7 +1109,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Video_RejectByTransportType) {
* ProtocolHandler shall send NAck on session_observer rejection
*/
TEST_F(ProtocolHandlerImplTest, EndSession_SessionObserverReject) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1148,7 +1149,7 @@ TEST_F(ProtocolHandlerImplTest, EndSession_SessionObserverReject) {
* ProtocolHandler shall send NAck on wrong hash code
*/
TEST_F(ProtocolHandlerImplTest, EndSession_Success) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1184,7 +1185,7 @@ TEST_F(ProtocolHandlerImplTest, EndSession_Success) {
#ifdef ENABLE_SECURITY
TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtocoloV1) {
using namespace protocol_handler;
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1262,7 +1263,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionUnprotected) {
AddSecurityManager();
const ServiceType start_service = kRpc;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -1289,7 +1290,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionUnprotected) {
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
@@ -1307,13 +1308,13 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionUnprotected) {
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_OFF, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack with PROTECTION_OFF on fail SLL creation
@@ -1324,7 +1325,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_Fail) {
AddSecurityManager();
const ServiceType start_service = kRpc;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
protocol_handler::SessionContext context = GetSessionContext(connection_id,
@@ -1360,7 +1361,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_Fail) {
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
context,
@@ -1376,20 +1377,20 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_Fail) {
ContextCreationStrategy::kUseExisting))
.
// Return fail protection
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), ReturnNull()));
times++;
// Expect send Ack with PROTECTION_OFF (on fail SLL creation)
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_ON, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack with PROTECTION_ON on already established and
@@ -1402,7 +1403,7 @@ TEST_F(ProtocolHandlerImplTest,
AddSecurityManager();
const ServiceType start_service = kRpc;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -1429,7 +1430,7 @@ TEST_F(ProtocolHandlerImplTest,
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
@@ -1447,34 +1448,33 @@ TEST_F(ProtocolHandlerImplTest,
EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key, _))
.
// Return new SSLContext
- WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(&ssl_context_mock)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(&ssl_context_mock)));
times++;
// Initilization check
EXPECT_CALL(ssl_context_mock, IsInitCompleted())
.
// emulate SSL is initilized
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Expect service protection enable
EXPECT_CALL(session_observer_mock,
SetProtectionFlag(connection_key, start_service))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
// Expect send Ack with PROTECTION_ON (on SSL is initilized)
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_ON)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_ON, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack with PROTECTION_OFF on session handshhake fail
@@ -1486,7 +1486,7 @@ TEST_F(ProtocolHandlerImplTest,
AddSecurityManager();
const ServiceType start_service = kRpc;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
protocol_handler::SessionContext context = GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -1521,7 +1521,7 @@ TEST_F(ProtocolHandlerImplTest,
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
context,
@@ -1546,14 +1546,14 @@ TEST_F(ProtocolHandlerImplTest,
EXPECT_CALL(ssl_context_mock, IsInitCompleted())
.
// emulate SSL is not initilized
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(false)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(false)));
times++;
// Pending handshake check
EXPECT_CALL(ssl_context_mock, IsHandshakePending())
.
// emulate is pending
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Expect add listener for handshake result
@@ -1567,13 +1567,13 @@ TEST_F(ProtocolHandlerImplTest,
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_ON, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack with PROTECTION_ON on session handshhake
@@ -1591,7 +1591,7 @@ TEST_F(ProtocolHandlerImplTest,
ON_CALL(protocol_handler_settings_mock, force_protected_service())
.WillByDefault(ReturnRefOfCopy(services));
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -1618,7 +1618,7 @@ TEST_F(ProtocolHandlerImplTest,
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
@@ -1635,29 +1635,28 @@ TEST_F(ProtocolHandlerImplTest,
EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key, _))
.
// Return new SSLContext
- WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(&ssl_context_mock)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(&ssl_context_mock)));
times++;
// Initilization check
EXPECT_CALL(ssl_context_mock, IsInitCompleted())
.
// emulate SSL is not initilized
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(false)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(false)));
times++;
// Pending handshake check
EXPECT_CALL(ssl_context_mock, IsHandshakePending())
.
// emulate is pending
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Expect add listener for handshake result
EXPECT_CALL(security_manager_mock, AddListener(_))
// Emulate handshake fail
.WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
Invoke(OnHandshakeDoneFunctor(
connection_key,
security_manager::SSLContext::Handshake_Result_Success))));
@@ -1668,26 +1667,26 @@ TEST_F(ProtocolHandlerImplTest,
GetSSLContext(connection_key, start_service))
.
// Emulate protection for service is not enabled
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), ReturnNull()));
times++;
// Expect service protection enable
EXPECT_CALL(session_observer_mock,
SetProtectionFlag(connection_key, start_service))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
// Expect send Ack with PROTECTION_OFF (on fail handshake)
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_ON)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_ON, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack with PROTECTION_ON on session handshhake
@@ -1705,7 +1704,7 @@ TEST_F(
ON_CALL(protocol_handler_settings_mock, force_protected_service())
.WillByDefault(ReturnRefOfCopy(services));
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -1732,7 +1731,7 @@ TEST_F(
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
@@ -1749,8 +1748,7 @@ TEST_F(
EXPECT_CALL(security_manager_mock, CreateSSLContext(connection_key, _))
.
// Return new SSLContext
- WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(&ssl_context_mock)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(&ssl_context_mock)));
times++;
// Initilization check
@@ -1763,14 +1761,14 @@ TEST_F(
EXPECT_CALL(ssl_context_mock, IsHandshakePending())
.
// emulate is pending
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Expect add listener for handshake result
EXPECT_CALL(security_manager_mock, AddListener(_))
// Emulate handshake fail
.WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
Invoke(OnHandshakeDoneFunctor(
connection_key,
security_manager::SSLContext::Handshake_Result_Success))));
@@ -1781,26 +1779,26 @@ TEST_F(
GetSSLContext(connection_key, start_service))
.
// Emulate protection for service is not enabled
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), ReturnNull()));
times++;
// Expect service protection enable
EXPECT_CALL(session_observer_mock,
SetProtectionFlag(connection_key, start_service))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
// Expect send Ack with PROTECTION_OFF (on fail handshake)
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_ON)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_ON, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* ProtocolHandler shall send Ack with PROTECTION_ON on session handshhake
@@ -1817,7 +1815,7 @@ TEST_F(ProtocolHandlerImplTest,
ON_CALL(protocol_handler_settings_mock, force_protected_service())
.WillByDefault(ReturnRefOfCopy(services));
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect verification of allowed transport
EXPECT_CALL(session_observer_mock,
@@ -1844,7 +1842,7 @@ TEST_F(ProtocolHandlerImplTest,
.
// Return sessions start success
WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
@@ -1864,34 +1862,33 @@ TEST_F(ProtocolHandlerImplTest,
ContextCreationStrategy::kUseExisting))
.
// Return new SSLContext
- WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(&ssl_context_mock)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(&ssl_context_mock)));
times++;
// Initilization check
EXPECT_CALL(ssl_context_mock, IsInitCompleted())
.
// emulate SSL is not initilized
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(false)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(false)));
times++;
// Pending handshake check
EXPECT_CALL(ssl_context_mock, IsHandshakePending())
.
// emulate is pending
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(false)));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(false)));
times++;
// Wait restart handshake operation
EXPECT_CALL(security_manager_mock, StartHandshake(connection_key))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
// Expect add listener for handshake result
EXPECT_CALL(security_manager_mock, AddListener(_))
// Emulate handshake
.WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
Invoke(OnHandshakeDoneFunctor(
connection_key,
security_manager::SSLContext::Handshake_Result_Success))));
@@ -1902,30 +1899,30 @@ TEST_F(ProtocolHandlerImplTest,
GetSSLContext(connection_key, start_service))
.
// Emulate protection for service is not enabled
- WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), ReturnNull()));
times++;
EXPECT_CALL(security_manager_mock, IsSystemTimeProviderReady())
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
EXPECT_CALL(session_observer_mock,
SetProtectionFlag(connection_key, start_service))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
// Expect send Ack with PROTECTION_ON (on successfull handshake)
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_START_SERVICE_ACK, PROTECTION_ON)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(
PROTECTION_ON, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
#endif // ENABLE_SECURITY
@@ -1945,7 +1942,7 @@ void ProtocolHandlerImplTest::VerifySecondaryTransportParamsInStartSessionAck(
.WillRepeatedly(Return(maximum_rpc_payload_size));
InitProtocolHandlerImpl(0u, 0u);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 5;
@@ -2050,7 +2047,7 @@ void ProtocolHandlerImplTest::VerifySecondaryTransportParamsInStartSessionAck(
transport_manager_mock,
SendMessageToDevice(ControlMessage(
FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF, connection_id, _)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
#ifdef ENABLE_SECURITY
@@ -2071,7 +2068,7 @@ void ProtocolHandlerImplTest::VerifySecondaryTransportParamsInStartSessionAck(
false /* protection */,
full_version);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
void ProtocolHandlerImplTest::VerifyCloudAppParamsInStartSessionAck(
@@ -2081,7 +2078,7 @@ void ProtocolHandlerImplTest::VerifyCloudAppParamsInStartSessionAck(
.WillRepeatedly(Return(maximum_rpc_payload_size));
InitProtocolHandlerImpl(0u, 0u);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 5;
@@ -2162,7 +2159,7 @@ void ProtocolHandlerImplTest::VerifyCloudAppParamsInStartSessionAck(
PROTECTION_OFF,
connection_id,
Eq(expected_param))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
#ifdef ENABLE_SECURITY
@@ -2185,7 +2182,7 @@ void ProtocolHandlerImplTest::VerifyCloudAppParamsInStartSessionAck(
false /* protection */,
full_version);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ProtocolHandlerImplTest,
@@ -2549,7 +2546,7 @@ TEST_F(
// Secondary transport param should not be included for apps with v5.0.0
TEST_F(ProtocolHandlerImplTest,
StartSessionAck_Unprotected_NoSecondaryTransportParamsForV5) {
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 5;
@@ -2620,7 +2617,7 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
connection_id,
Eq(expected_param))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
connection_handler::SessionTransports dummy_st = {0, 0};
@@ -2653,7 +2650,7 @@ TEST_F(ProtocolHandlerImplTest,
false /* protection */,
full_version);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ProtocolHandlerImplTest, StartSessionAck_PrimaryTransportUSBHostMode) {
@@ -2721,7 +2718,7 @@ TEST_F(ProtocolHandlerImplTest, StartSessionAck_CloudAppAuthTokenAvailable) {
TEST_F(ProtocolHandlerImplTest,
TransportEventUpdate_afterVersionNegotiation_TCPEnabled) {
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 5;
@@ -2791,7 +2788,7 @@ TEST_F(ProtocolHandlerImplTest,
transport_manager_mock,
SendMessageToDevice(ControlMessage(
FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF, connection_id, _)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
@@ -2818,7 +2815,7 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
connection_id,
Eq(expected_param))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
#ifdef ENABLE_SECURITY
@@ -2839,12 +2836,12 @@ TEST_F(ProtocolHandlerImplTest,
false /* protection */,
full_version);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ProtocolHandlerImplTest,
TransportEventUpdate_afterVersionNegotiation_TCPDisabled) {
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 5;
@@ -2912,7 +2909,7 @@ TEST_F(ProtocolHandlerImplTest,
transport_manager_mock,
SendMessageToDevice(ControlMessage(
FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF, connection_id, _)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
@@ -2939,7 +2936,7 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
connection_id,
Eq(expected_param))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
#ifdef ENABLE_SECURITY
@@ -2960,7 +2957,7 @@ TEST_F(ProtocolHandlerImplTest,
false /* protection */,
full_version);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ProtocolHandlerImplTest,
@@ -2968,7 +2965,7 @@ TEST_F(ProtocolHandlerImplTest,
using connection_handler::SessionConnectionMap;
using connection_handler::SessionTransports;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
char tcp_address[] = "172.16.2.3";
@@ -3022,12 +3019,12 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
device2_primary_connection_id,
Eq(expected_param))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
tm_listener->OnTransportConfigUpdated(configs);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ProtocolHandlerImplTest,
@@ -3035,7 +3032,7 @@ TEST_F(ProtocolHandlerImplTest,
using connection_handler::SessionConnectionMap;
using connection_handler::SessionTransports;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
char tcp_address[] = "172.16.2.3";
@@ -3092,7 +3089,7 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
device1_primary_connection_id,
Eq(expected_param))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
EXPECT_CALL(
transport_manager_mock,
@@ -3100,18 +3097,18 @@ TEST_F(ProtocolHandlerImplTest,
PROTECTION_OFF,
device3_primary_connection_id,
Eq(expected_param))))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
tm_listener->OnTransportConfigUpdated(configs);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_SUCCESS) {
AddConnection();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
transport_manager::ConnectionUID primary_connection_id = 123;
@@ -3131,7 +3128,7 @@ TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_SUCCESS) {
PROTECTION_OFF,
connection_id,
_)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(PROTECTION_OFF,
@@ -3140,13 +3137,13 @@ TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_SUCCESS) {
FRAME_DATA_REGISTER_SECONDARY_TRANSPORT,
PROTOCOL_VERSION_5);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_FAILURE) {
AddConnection();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
transport_manager::ConnectionUID primary_connection_id = 123;
@@ -3167,7 +3164,7 @@ TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_FAILURE) {
PROTECTION_OFF,
connection_id,
_)))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
SendControlMessage(PROTECTION_OFF,
@@ -3176,16 +3173,16 @@ TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_FAILURE) {
FRAME_DATA_REGISTER_SECONDARY_TRANSPORT,
PROTOCOL_VERSION_5);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification) {
+TEST_F(ProtocolHandlerImplTest, FloodVerification) {
const size_t period_msec = 10000;
const size_t max_messages = 1000;
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3224,13 +3221,13 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_ThresholdValue) {
+TEST_F(ProtocolHandlerImplTest, FloodVerification_ThresholdValue) {
const size_t period_msec = 10000;
const size_t max_messages = 1000;
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3268,13 +3265,13 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_ThresholdValue) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_VideoFrameSkip) {
+TEST_F(ProtocolHandlerImplTest, FloodVerification_VideoFrameSkip) {
const size_t period_msec = 10000;
const size_t max_messages = 1000;
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3304,13 +3301,13 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_VideoFrameSkip) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_AudioFrameSkip) {
+TEST_F(ProtocolHandlerImplTest, FloodVerification_AudioFrameSkip) {
const size_t period_msec = 10000;
const size_t max_messages = 1000;
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3340,13 +3337,13 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_AudioFrameSkip) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerificationDisable) {
+TEST_F(ProtocolHandlerImplTest, FloodVerificationDisable) {
const size_t period_msec = 0;
const size_t max_messages = 0;
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3382,7 +3379,7 @@ TEST_F(ProtocolHandlerImplTest, MalformedVerificationDisable) {
InitProtocolHandlerImpl(0u, 0u, false, period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3408,13 +3405,13 @@ TEST_F(ProtocolHandlerImplTest, MalformedVerificationDisable) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest, DISABLED_MalformedLimitVerification) {
+TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification) {
const size_t period_msec = 10000;
const size_t max_messages = 100;
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3462,14 +3459,13 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_MalformedLimitVerification) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest,
- DISABLED_MalformedLimitVerification_MalformedStock) {
+TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_MalformedStock) {
const size_t period_msec = 10000;
const size_t max_messages = 100;
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3548,7 +3544,7 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_MalformedOnly) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3608,7 +3604,7 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_NullTimePeriod) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3641,7 +3637,7 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_NullCount) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3731,10 +3727,9 @@ TEST_F(ProtocolHandlerImplTest,
protocol_handler_impl->SendEndSession(connection_id, session_id);
}
-TEST_F(ProtocolHandlerImplTest,
- DISABLED_SendEndServicePrivate_EndSession_MessageSent) {
+TEST_F(ProtocolHandlerImplTest, SendEndServicePrivate_EndSession_MessageSent) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3761,7 +3756,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
SendEndServicePrivate_ServiceTypeControl_MessageSent) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3800,7 +3795,7 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeat_NoConnection_NotSent) {
TEST_F(ProtocolHandlerImplTest, SendHeartBeat_Successful) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3825,7 +3820,7 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeat_Successful) {
TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_Successful) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3855,7 +3850,7 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_Successful) {
TEST_F(ProtocolHandlerImplTest,
SendHeartBeatAck_ProtocolVersionUsedFail_Cancelled) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3876,10 +3871,9 @@ TEST_F(ProtocolHandlerImplTest,
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
-TEST_F(ProtocolHandlerImplTest,
- DISABLED_SendHeartBeatAck_WrongProtocolVersion_NotSent) {
+TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_WrongProtocolVersion_NotSent) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3913,7 +3907,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
SendMessageToMobileApp_SendSingleControlMessage) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3954,7 +3948,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
SendMessageToMobileApp_SendSingleNonControlMessage) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -3999,7 +3993,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest, SendMessageToMobileApp_SendMultiframeMessage) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4058,7 +4052,7 @@ TEST_F(ProtocolHandlerImplTest, SendMessageToMobileApp_SendMultiframeMessage) {
TEST_F(ProtocolHandlerImplTest,
SendMessageToMobileApp_NullMessagePointer_Cancelled) {
// Arrange
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4471,7 +4465,7 @@ TEST_F(ProtocolHandlerImplTest, GetHashId_ProtocolVersion5_ValidData) {
}
TEST_F(ProtocolHandlerImplTest, SetHashId_CorrectHashId) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 3;
@@ -4515,7 +4509,7 @@ TEST_F(ProtocolHandlerImplTest, SetHashId_CorrectHashId) {
}
TEST_F(ProtocolHandlerImplTest, SetHashId_HASH_ID_NOT_SUPPORTED) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 3;
@@ -4551,7 +4545,7 @@ TEST_F(ProtocolHandlerImplTest, SetHashId_HASH_ID_NOT_SUPPORTED) {
}
TEST_F(ProtocolHandlerImplTest, SetHashId_HASH_ID_WRONG) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
const uint8_t input_protocol_version = 3;
@@ -4589,7 +4583,7 @@ TEST_F(ProtocolHandlerImplTest, SetHashId_HASH_ID_WRONG) {
TEST_F(ProtocolHandlerImplTest, PopValidAndExpiredMultiframes) {
using namespace protocol_handler;
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4633,7 +4627,7 @@ TEST_F(ProtocolHandlerImplTest, PopValidAndExpiredMultiframes) {
}
TEST_F(ProtocolHandlerImplTest, HandleFromMobile_FrameTypeSingle_Handled) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4660,7 +4654,7 @@ TEST_F(ProtocolHandlerImplTest, HandleFromMobile_FrameTypeSingle_Handled) {
#ifdef ENABLE_SECURITY
TEST_F(ProtocolHandlerImplTest, EncryptFrame_NoSecurityManagerSet_Cancelled) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4691,7 +4685,7 @@ TEST_F(ProtocolHandlerImplTest, EncryptFrame_NoSecurityManagerSet_Cancelled) {
TEST_F(ProtocolHandlerImplTest,
EncryptFrame_ControlFrameType_ContinueUnencrypted) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4723,7 +4717,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
EncryptFrame_SSLContextInitNotCompleted_ContinueUnencrypted) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4763,7 +4757,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
EncryptFrame_EncryptFailed_ContinueUnencrypted) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4817,7 +4811,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
EncryptFrame_EncryptSucceeded_ContinueEncrypted) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4867,7 +4861,7 @@ TEST_F(ProtocolHandlerImplTest,
}
TEST_F(ProtocolHandlerImplTest, DecryptFrame_NoSecurityManager_Cancelled) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4898,28 +4892,29 @@ TEST_F(ProtocolHandlerImplTest, DecryptFrame_NoSecurityManager_Cancelled) {
}
TEST_F(ProtocolHandlerImplTest,
- DISABLED_DecryptFrame_ProtectionFlagOff_ContinueUndecrypted) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ DecryptFrame_ProtectionFlagOff_ContinueUndecrypted) {
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
-
- const uint8_t data_size = 0u;
+ const uint8_t data_size = 1u;
+ const uint8_t data_value = 7u;
ProtocolFramePtr frame_ptr =
std::make_shared<ProtocolPacket>(connection_id,
PROTOCOL_VERSION_3,
PROTECTION_OFF,
- FRAME_TYPE_FIRST,
+ FRAME_TYPE_SINGLE,
kAudio,
- FRAME_DATA_FIRST,
+ FRAME_DATA_SINGLE,
session_id,
data_size,
message_id,
- null_data_);
+ &data_value);
EXPECT_CALL(ssl_context_mock, Decrypt(_, _, _, _)).Times(0);
protocol_handler_impl->SetTelemetryObserver(&telemetry_observer_mock);
EXPECT_CALL(telemetry_observer_mock, StartMessageProcess(message_id, _));
+ EXPECT_CALL(telemetry_observer_mock, EndMessageProcess(_));
connection_handler::SessionTransports st;
st.primary_transport = connection_id;
@@ -4932,8 +4927,8 @@ TEST_F(ProtocolHandlerImplTest,
}
TEST_F(ProtocolHandlerImplTest,
- DISABLED_DecryptFrame_FrameTypeControl_ContinueUndecrypted) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ DecryptFrame_FrameTypeControl_ContinueUndecrypted) {
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -4970,7 +4965,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
DecryptFrame_SSLContextInitNotCompleted_Cancelled) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -5004,7 +4999,7 @@ TEST_F(ProtocolHandlerImplTest,
}
TEST_F(ProtocolHandlerImplTest, DecryptFrame_DecryptFailed_Cancelled) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -5048,7 +5043,7 @@ TEST_F(ProtocolHandlerImplTest, DecryptFrame_DecryptFailed_Cancelled) {
TEST_F(ProtocolHandlerImplTest,
DecryptFrame_DecryptSucceeded_ContinueDecrypted) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -5115,7 +5110,7 @@ TEST_F(ProtocolHandlerImplTest, SendFrame_EncryptFailed_FAIL) {
#endif // ENABLE_SECURITY
TEST_F(ProtocolHandlerImplTest, SendServiceDataAck_PreVersion5) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -5142,7 +5137,7 @@ TEST_F(ProtocolHandlerImplTest, SendServiceDataAck_PreVersion5) {
}
TEST_F(ProtocolHandlerImplTest, SendServiceDataAck_AfterVersion5) {
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
@@ -5255,7 +5250,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_NACKReason_SessionObserverReject) {
.WillRepeatedly(ReturnNull());
#endif // ENABLE_SECURITY
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
ServiceType service_type;
// Expect verification of allowed transport
@@ -5284,7 +5279,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_NACKReason_SessionObserverReject) {
.
// Return sessions start rejection
WillRepeatedly(
- DoAll(NotifyTestAsyncWaiter(&waiter),
+ DoAll(NotifyTestAsyncWaiter(waiter),
SaveArg<2>(&service_type),
InvokeMemberFuncWithArg3(
protocol_handler_impl.get(),
@@ -5323,7 +5318,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_NACKReason_SessionObserverReject) {
Eq(nack_params))))
.Times(call_times)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times += call_times;
for (const ServiceType& service_type : service_types) {
@@ -5334,7 +5329,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_NACKReason_SessionObserverReject) {
PROTOCOL_VERSION_5);
}
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
@@ -5346,7 +5341,7 @@ TEST_F(ProtocolHandlerImplTest,
const utils::SemanticVersion min_reason_param_version(5, 3, 0);
std::string err_reason =
"Wrong hash_id for session " + std::to_string(session_id);
- std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
AddSession(waiter, times);
diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc
index b4b4d01485..7d3b7869f2 100644
--- a/src/components/security_manager/src/crypto_manager_impl.cc
+++ b/src/components/security_manager/src/crypto_manager_impl.cc
@@ -36,20 +36,21 @@
#include <openssl/err.h>
#include <openssl/pkcs12.h>
#include <openssl/ssl.h>
-
#include <stdio.h>
+
#include <algorithm>
#include <ctime>
#include <fstream>
#include <iostream>
-#include "security_manager/security_manager.h"
+#include "security_manager/security_manager.h"
#include "utils/atomic.h"
#include "utils/date_time.h"
#include "utils/logger.h"
#include "utils/macro.h"
#include "utils/scope_guard.h"
+#define OPENSSL1_1_VERSION 0x1010000fL
#define TLS1_1_MINIMAL_VERSION 0x1000103fL
#define CONST_SSL_METHOD_MINIMAL_VERSION 0x00909000L
@@ -174,7 +175,11 @@ bool CryptoManagerImpl::Init() {
#endif
case TLSv1:
SDL_LOG_DEBUG("TLSv1 is used");
+#if OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
+#else
+ method = is_server ? TLS_server_method() : TLS_client_method();
+#endif
break;
case TLSv1_1:
SDL_LOG_DEBUG("TLSv1_1 is used");
@@ -182,8 +187,10 @@ bool CryptoManagerImpl::Init() {
SDL_LOG_WARN(
"OpenSSL has no TLSv1.1 with version lower 1.0.1, set TLSv1.0");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
-#else
+#elif OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? TLSv1_1_server_method() : TLSv1_1_client_method();
+#else
+ method = is_server ? TLS_server_method() : TLS_client_method();
#endif
break;
case TLSv1_2:
@@ -192,13 +199,19 @@ bool CryptoManagerImpl::Init() {
SDL_LOG_WARN(
"OpenSSL has no TLSv1.2 with version lower 1.0.1, set TLSv1.0");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
-#else
+#elif OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? TLSv1_2_server_method() : TLSv1_2_client_method();
+#else
+ method = is_server ? TLS_server_method() : TLS_client_method();
#endif
break;
case DTLSv1:
SDL_LOG_DEBUG("DTLSv1 is used");
+#if OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? DTLSv1_server_method() : DTLSv1_client_method();
+#else
+ method = is_server ? DTLS_server_method() : DTLS_client_method();
+#endif
break;
default:
SDL_LOG_ERROR("Unknown protocol: "
diff --git a/src/components/security_manager/test/security_manager_test.cc b/src/components/security_manager/test/security_manager_test.cc
index 4145334115..912ffff4c7 100644
--- a/src/components/security_manager/test/security_manager_test.cc
+++ b/src/components/security_manager/test/security_manager_test.cc
@@ -284,7 +284,7 @@ TEST_F(SecurityManagerTest, SecurityManager_NULLCryptoManager) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
@@ -295,14 +295,14 @@ TEST_F(SecurityManagerTest, SecurityManager_NULLCryptoManager) {
InternalErrorWithErrId(SecurityManager::ERROR_NOT_SUPPORTED),
false,
kIsFinal))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
const SecurityQuery::QueryHeader header(SecurityQuery::REQUEST,
// It could be any query id
SecurityQuery::INVALID_QUERY_ID);
const uint8_t data = 0;
EmulateMobileMessage(header, &data, 1);
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
/*
* Shall skip all OnMobileMessageSent
@@ -377,14 +377,14 @@ TEST_F(SecurityManagerTest, GetInvalidQueryId) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Expect InternalError with ERROR_ID
@@ -394,14 +394,14 @@ TEST_F(SecurityManagerTest, GetInvalidQueryId) {
InternalErrorWithErrId(SecurityManager::ERROR_INVALID_QUERY_ID),
false,
kIsFinal))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
const SecurityQuery::QueryHeader header(SecurityQuery::REQUEST,
SecurityQuery::INVALID_QUERY_ID);
const uint8_t data = 0;
EmulateMobileMessage(header, &data, 1);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
/*
* Shall send Internall Error on call
@@ -577,7 +577,7 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_WrongDataSize) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
@@ -590,11 +590,11 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_WrongDataSize) {
InternalErrorWithErrId(SecurityManager::ERROR_INVALID_QUERY_SIZE),
false,
kIsFinal))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
EmulateMobileMessageHandshake(NULL, 0);
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
/*
* Shall send InternallError on
@@ -607,14 +607,14 @@ TEST_F(SecurityManagerTest, DISABLED_ProcessHandshakeData_ServiceNotProtected) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
EXPECT_CALL(
mock_protocol_handler,
@@ -622,24 +622,24 @@ TEST_F(SecurityManagerTest, DISABLED_ProcessHandshakeData_ServiceNotProtected) {
InternalErrorWithErrId(SecurityManager::ERROR_SERVICE_NOT_PROTECTED),
false,
kIsFinal))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
times++;
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Emulate SessionObserver result
EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), ReturnNull()));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), ReturnNull()));
times++;
const uint8_t data[] = {0x1, 0x2};
EmulateMobileMessageHandshake(data, sizeof(data) / sizeof(data[0]));
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
// Listener was destroyed after OnHandshakeDone call
mock_sm_listener.release();
@@ -658,16 +658,16 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_InvalidData) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
.Times(handshake_emulates)
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
times += handshake_emulates;
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.Times(handshake_emulates)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times += handshake_emulates;
// Expect InternalError with ERROR_ID
@@ -678,12 +678,12 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_InvalidData) {
false,
kIsFinal))
.Times(handshake_emulates)
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
times += handshake_emulates;
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Emulate SessionObserver and CryptoManager result
@@ -700,19 +700,19 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_InvalidData) {
_))
.WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_AbnormalFail)))
.WillOnce(DoAll(SetArgPointee<2>((uint8_t*)NULL),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_AbnormalFail)))
.WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(0),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_AbnormalFail)))
.WillOnce(DoAll(SetArgPointee<2>((uint8_t*)NULL),
SetArgPointee<3>(0),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_AbnormalFail)));
times += 4; // matches to each single call above
@@ -723,7 +723,7 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_InvalidData) {
EmulateMobileMessageHandshake(
handshake_data, handshake_data_size, handshake_emulates);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
// Listener was destroyed after OnHandshakeDone call
mock_sm_listener.release();
@@ -740,16 +740,16 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_Answer) {
uint32_t connection_id = 0;
uint8_t session_id = 0;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _))
.Times(handshake_emulates)
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
times += handshake_emulates;
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.Times(handshake_emulates)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times += handshake_emulates;
// Get size of raw message after
@@ -758,23 +758,23 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_Answer) {
SendMessageToMobileApp(
RawMessageEqSize(raw_message_size), false, kIsFinal))
.Times(handshake_emulates)
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
times += handshake_emulates;
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
OnHandshakeDone(kKey, SSLContext::Handshake_Result_Fail))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Emulate SessionObserver and CryptoManager result
EXPECT_CALL(mock_ssl_context_exists, IsInitCompleted())
.Times(handshake_emulates)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(false)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(false)));
times += handshake_emulates;
EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.Times(handshake_emulates)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter),
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter),
Return(&mock_ssl_context_exists)));
times += handshake_emulates;
@@ -787,18 +787,18 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_Answer) {
_))
.WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Success)))
.WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Fail)));
times += 2; // matches to each single call above
EmulateMobileMessageHandshake(
handshake_data, handshake_data_size, handshake_emulates);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
// Listener was destroyed after OnHandshakeDone call
mock_sm_listener.release();
@@ -813,24 +813,24 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_HandshakeFinished) {
// Count handshake calls
const int handshake_emulates = 6;
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
uint32_t times = 0;
// Expect no errors
// Expect notifying listeners (success)
EXPECT_CALL(*mock_sm_listener,
OnHandshakeDone(kKey, SSLContext::Handshake_Result_Success))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times++;
// Emulate SessionObserver and CryptoManager result
EXPECT_CALL(mock_session_observer, GetSSLContext(kKey, kControl))
.Times(handshake_emulates)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter),
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter),
Return(&mock_ssl_context_exists)));
times += handshake_emulates;
EXPECT_CALL(mock_ssl_context_exists, IsInitCompleted())
.Times(handshake_emulates)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times += handshake_emulates;
EXPECT_CALL(
@@ -843,31 +843,31 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_HandshakeFinished) {
// two states with correct out data
WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Success)))
.WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Fail)))
.
// two states with with null pointer data
WillOnce(DoAll(SetArgPointee<2>((uint8_t*)NULL),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Success)))
.WillOnce(DoAll(SetArgPointee<2>((uint8_t*)NULL),
SetArgPointee<3>(handshake_data_out_size),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Fail)))
.
// two states with with null data size
WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(0),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Success)))
.WillOnce(DoAll(SetArgPointee<2>(handshake_data_out_pointer),
SetArgPointee<3>(0),
- NotifyTestAsyncWaiter(&waiter),
+ NotifyTestAsyncWaiter(waiter),
Return(SSLContext::Handshake_Result_Success)));
times += 6; // matches to each single call above
@@ -880,19 +880,19 @@ TEST_F(SecurityManagerTest, ProcessHandshakeData_HandshakeFinished) {
EXPECT_CALL(mock_session_observer,
ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.Times(2)
- .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(waiter), Return(true)));
times += 2; // matches to the number above
EXPECT_CALL(mock_protocol_handler, SendMessageToMobileApp(_, false, kIsFinal))
.Times(2)
- .WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
+ .WillRepeatedly(NotifyTestAsyncWaiter(waiter));
times += 2; // matches to the number above
// Expect NO InternalError with ERROR_ID
EmulateMobileMessageHandshake(
handshake_data, handshake_data_size, handshake_emulates);
- EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
// Listener was destroyed after OnHandshakeDone call
mock_sm_listener.release();
diff --git a/src/components/security_manager/test/ssl_certificate_handshake_test.cc b/src/components/security_manager/test/ssl_certificate_handshake_test.cc
index 1034bb3c83..d1de81de73 100644
--- a/src/components/security_manager/test/ssl_certificate_handshake_test.cc
+++ b/src/components/security_manager/test/ssl_certificate_handshake_test.cc
@@ -413,7 +413,7 @@ TEST_P(SSLHandshakeTest, CAVerification_ServerSide) {
GTEST_TRACE(HandshakeProcedure_Success());
}
-TEST_P(SSLHandshakeTest, CAVerification_ServerSide_NoCACertificate) {
+TEST_P(SSLHandshakeTest, DISABLED_CAVerification_ServerSide_NoCACertificate) {
ASSERT_TRUE(InitServerManagers(
GetParam().server_protocol, "", "ALL", verify_peer, "unex"))
<< server_manager_->LastError();
diff --git a/src/components/security_manager/test/ssl_context_test.cc b/src/components/security_manager/test/ssl_context_test.cc
index e4d6c308bb..12620a9d4c 100644
--- a/src/components/security_manager/test/ssl_context_test.cc
+++ b/src/components/security_manager/test/ssl_context_test.cc
@@ -227,220 +227,6 @@ class SSLTest : public testing::Test {
std::string SSLTest::client_certificate_data_base64_;
std::string SSLTest::server_certificate_data_base64_;
-// StartHandshake() fails when client and server protocols are not TLSv1_2
-class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
- protected:
- virtual void SetUp() OVERRIDE {
- std::ifstream certificate_file("server/spt_credential.p12");
- ASSERT_TRUE(certificate_file.is_open())
- << "Could not open certificate data file";
-
- const std::string certificate(
- (std::istreambuf_iterator<char>(certificate_file)),
- std::istreambuf_iterator<char>());
- certificate_file.close();
- ASSERT_FALSE(certificate.empty()) << "Certificate data file is empty";
- certificate_data_base64_ = certificate;
-
- mock_crypto_manager_settings_ = std::make_shared<
- NiceMock<security_manager_test::MockCryptoManagerSettings> >();
- std::shared_ptr<security_manager::CryptoManagerSettings> server_crypto(
- mock_crypto_manager_settings_);
- crypto_manager_ = new security_manager::CryptoManagerImpl(server_crypto);
-
- SetServerInitialValues(GetParam().server_protocol_,
- GetParam().server_ciphers_list_);
-
- const bool crypto_manager_initialization = crypto_manager_->Init();
- EXPECT_TRUE(crypto_manager_initialization);
-
- mock_client_manager_settings_ = std::make_shared<
- NiceMock<security_manager_test::MockCryptoManagerSettings> >();
-
- std::shared_ptr<security_manager::CryptoManagerSettings> client_crypto(
- mock_client_manager_settings_);
- client_manager_ = new security_manager::CryptoManagerImpl(client_crypto);
-
- SetClientInitialValues(GetParam().client_protocol_,
- GetParam().client_ciphers_list_);
-
- const bool client_manager_initialization = client_manager_->Init();
- EXPECT_TRUE(client_manager_initialization);
-
- server_ctx_ = crypto_manager_->CreateSSLContext();
- client_ctx_ = client_manager_->CreateSSLContext();
-
- using custom_str::CustomString;
-
- server_ctx_->SetHandshakeContext(
- security_manager::SSLContext::HandshakeContext(CustomString("SPT"),
- CustomString("client")));
- client_ctx_->SetHandshakeContext(
- security_manager::SSLContext::HandshakeContext(CustomString("SPT"),
- CustomString("server")));
-
- kServerBuf = NULL;
- kClientBuf = NULL;
- server_buf_len = 0u;
- client_buf_len = 0u;
- }
-
- void TearDown() OVERRIDE {
- crypto_manager_->ReleaseSSLContext(server_ctx_);
- client_manager_->ReleaseSSLContext(client_ctx_);
-
- delete crypto_manager_;
- delete client_manager_;
- }
-
- void SetServerInitialValues(security_manager::Protocol protocol,
- const std::string& server_ciphers_list) {
- ON_CALL(*mock_crypto_manager_settings_, force_unprotected_service())
- .WillByDefault(ReturnRef(forced_unprotected_service_));
- ON_CALL(*mock_crypto_manager_settings_, force_protected_service())
- .WillByDefault(ReturnRef(forced_protected_service_));
- ON_CALL(*mock_crypto_manager_settings_, security_manager_mode())
- .WillByDefault(Return(security_manager::SERVER));
- ON_CALL(*mock_crypto_manager_settings_, security_manager_protocol_name())
- .WillByDefault(Return(protocol));
- ON_CALL(*mock_crypto_manager_settings_, certificate_data())
- .WillByDefault(ReturnRef(certificate_data_base64_));
- ON_CALL(*mock_crypto_manager_settings_, ciphers_list())
- .WillByDefault(ReturnRef(server_ciphers_list));
- ON_CALL(*mock_crypto_manager_settings_, ca_cert_path())
- .WillByDefault(ReturnRef(kCaPath));
- ON_CALL(*mock_crypto_manager_settings_, verify_peer())
- .WillByDefault(Return(false));
- ON_CALL(*mock_crypto_manager_settings_, module_cert_path())
- .WillByDefault(ReturnRef(kServerCertPath));
- ON_CALL(*mock_crypto_manager_settings_, module_key_path())
- .WillByDefault(ReturnRef(kServerPrivateKeyPath));
- }
-
- void SetClientInitialValues(security_manager::Protocol protocol,
- const std::string& client_ciphers_list) {
- ON_CALL(*mock_client_manager_settings_, force_unprotected_service())
- .WillByDefault(ReturnRef(forced_unprotected_service_));
- ON_CALL(*mock_client_manager_settings_, force_protected_service())
- .WillByDefault(ReturnRef(forced_protected_service_));
- ON_CALL(*mock_client_manager_settings_, security_manager_mode())
- .WillByDefault(Return(security_manager::CLIENT));
- ON_CALL(*mock_client_manager_settings_, security_manager_protocol_name())
- .WillByDefault(Return(protocol));
- ON_CALL(*mock_client_manager_settings_, certificate_data())
- .WillByDefault(ReturnRef(certificate_data_base64_));
- ON_CALL(*mock_client_manager_settings_, ciphers_list())
- .WillByDefault(ReturnRef(client_ciphers_list));
- ON_CALL(*mock_client_manager_settings_, ca_cert_path())
- .WillByDefault(ReturnRef(kCaPath));
- ON_CALL(*mock_client_manager_settings_, verify_peer())
- .WillByDefault(Return(false));
- ON_CALL(*mock_client_manager_settings_, module_cert_path())
- .WillByDefault(ReturnRef(kClientCertPath));
- ON_CALL(*mock_client_manager_settings_, module_key_path())
- .WillByDefault(ReturnRef(kClientPrivateKeyPath));
- }
-
- std::shared_ptr<NiceMock<security_manager_test::MockCryptoManagerSettings> >
- mock_crypto_manager_settings_;
- std::shared_ptr<NiceMock<security_manager_test::MockCryptoManagerSettings> >
- mock_client_manager_settings_;
- security_manager::CryptoManager* crypto_manager_;
- security_manager::CryptoManager* client_manager_;
- security_manager::SSLContext* server_ctx_;
- security_manager::SSLContext* client_ctx_;
- std::string certificate_data_base64_;
- const std::vector<int> forced_unprotected_service_;
- const std::vector<int> forced_protected_service_;
-};
-
-class SSLTestForTLS1_2 : public SSLTestParam {};
-
-// This case fails starting because we can handshake only with TLSv1_2 protocol.
-INSTANTIATE_TEST_CASE_P(
- CorrectProtocolAndCiphers,
- SSLTestParam,
- ::testing::Values(ProtocolAndCipher(security_manager::TLSv1_1,
- security_manager::TLSv1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_1,
- security_manager::TLSv1_1,
- kFordCipher,
- kFordCipher)
-#ifndef OPENSSL_NO_SSL3
- ,
- ProtocolAndCipher(security_manager::SSLv3,
- security_manager::SSLv3,
- kFordCipher,
- kFordCipher)
-#endif
- ,
- ProtocolAndCipher(security_manager::DTLSv1,
- security_manager::DTLSv1,
- kFordCipher,
- kFordCipher)));
-
-INSTANTIATE_TEST_CASE_P(
- IncorrectProtocolAndCiphers,
- SSLTestParam,
- ::testing::Values(ProtocolAndCipher(security_manager::TLSv1,
- security_manager::TLSv1_1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_1,
- security_manager::TLSv1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_2,
- security_manager::TLSv1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_2,
- security_manager::TLSv1_1,
- kFordCipher,
- kFordCipher)
-#ifndef OPENSSL_NO_SSL3
- ,
- ProtocolAndCipher(security_manager::TLSv1,
- security_manager::SSLv3,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_1,
- security_manager::SSLv3,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1,
- security_manager::DTLSv1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::DTLSv1,
- security_manager::TLSv1_1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_2,
- security_manager::DTLSv1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_1,
- security_manager::DTLSv1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_2,
- security_manager::SSLv3,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::SSLv3,
- security_manager::TLSv1,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::SSLv3,
- security_manager::TLSv1_1,
- kFordCipher,
- kFordCipher)
-#endif
- ));
-
TEST_F(SSLTest, OnTSL2Protocol_BrokenHandshake) {
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
client_ctx_->StartHandshake(&kClientBuf, &client_buf_len));
@@ -570,58 +356,6 @@ TEST_F(SSLTest, OnTSL2Protocol_EcncryptionFail) {
text, text_len, &encrypted_text, &encrypted_text_len));
}
-TEST_P(SSLTestParam, ClientAndServerNotTLSv1_2_HandshakeFailed) {
- ASSERT_EQ(security_manager::SSLContext::Handshake_Result_AbnormalFail,
- client_ctx_->StartHandshake(&kClientBuf, &client_buf_len));
-
- EXPECT_TRUE(NULL == kClientBuf);
- EXPECT_EQ(0u, client_buf_len);
- ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- server_ctx_->DoHandshakeStep(
- kClientBuf, client_buf_len, &kServerBuf, &server_buf_len));
- EXPECT_TRUE(NULL == kServerBuf);
- EXPECT_EQ(0u, server_buf_len);
-
- EXPECT_FALSE(server_ctx_->IsInitCompleted());
-}
-
-INSTANTIATE_TEST_CASE_P(
- ServerProtocolTLSv12,
- SSLTestForTLS1_2,
- ::testing::Values(ProtocolAndCipher(security_manager::TLSv1,
- security_manager::TLSv1_2,
- kFordCipher,
- kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_1,
- security_manager::TLSv1_2,
- kFordCipher,
- kFordCipher)
-#ifndef OPENSSL_NO_SSL3
- ,
- ProtocolAndCipher(security_manager::SSLv3,
- security_manager::TLSv1_2,
- kFordCipher,
- kFordCipher)
-#endif
- ));
-
-TEST_P(SSLTestForTLS1_2, HandshakeFailed) {
- ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
- client_ctx_->StartHandshake(&kClientBuf, &client_buf_len));
- EXPECT_FALSE(NULL == kClientBuf);
- ASSERT_LT(0u, client_buf_len);
-
- ASSERT_EQ(security_manager::SSLContext::Handshake_Result_AbnormalFail,
- server_ctx_->DoHandshakeStep(
- kClientBuf, client_buf_len, &kServerBuf, &server_buf_len))
- << ERR_reason_error_string(ERR_get_error());
-
- EXPECT_TRUE(NULL == kServerBuf);
- EXPECT_EQ(0u, server_buf_len);
-
- EXPECT_FALSE(server_ctx_->IsInitCompleted());
-}
-
} // namespace ssl_context_test
} // namespace components
} // namespace test
diff --git a/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
index 6aaec5d659..7a440d2429 100644
--- a/src/components/transport_manager/src/tcp/tcp_client_listener.cc
+++ b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
@@ -41,7 +41,6 @@
#include <signal.h>
#include <sys/select.h>
#include <sys/socket.h>
-#include <sys/sysctl.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef __linux__
@@ -50,6 +49,7 @@
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/tcp_var.h>
+#include <sys/sysctl.h>
#include <sys/time.h>
#endif // __linux__
diff --git a/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc b/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
index befba30fbd..73cc8a5e9a 100644
--- a/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
+++ b/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
@@ -119,10 +119,10 @@ TEST_F(NetworkInterfaceListenerTest, Start_success) {
// after stated, it is expected that the listener notifies current IP address
// (if it's available)
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(mock_tcp_client_listener_,
OnIPAddressUpdated(entries[0].ipv4_address, ""))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
EXPECT_TRUE(interface_listener_impl_->Start());
@@ -131,7 +131,7 @@ TEST_F(NetworkInterfaceListenerTest, Start_success) {
EXPECT_TRUE(interface_listener_impl_->GetThread()->IsRunning());
- EXPECT_TRUE(waiter.WaitFor(1, kStartNotificationTimeoutMsec));
+ EXPECT_TRUE(waiter->WaitFor(1, kStartNotificationTimeoutMsec));
Deinit();
}
diff --git a/src/components/transport_manager/test/tcp_client_listener_test.cc b/src/components/transport_manager/test/tcp_client_listener_test.cc
index d71db3e770..e29028b562 100644
--- a/src/components/transport_manager/test/tcp_client_listener_test.cc
+++ b/src/components/transport_manager/test/tcp_client_listener_test.cc
@@ -250,7 +250,7 @@ TEST_P(TcpClientListenerTest, ClientConnection) {
int s = socket(AF_INET, SOCK_STREAM, 0);
EXPECT_TRUE(0 <= s);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
// controller should be notified of AddDevice event
DeviceSptr mock_device = std::make_shared<MockTCPDevice>(
@@ -258,7 +258,7 @@ TEST_P(TcpClientListenerTest, ClientConnection) {
EXPECT_CALL(adapter_controller_mock_, AddDevice(_))
.WillOnce(Return(mock_device));
EXPECT_CALL(adapter_controller_mock_, ConnectionCreated(_, _, _))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
// adapter_controller_mock_ may also receive ConnectDone() and
// ConnectionFinished() from ThreadedSocketConnection. Ignore them as hey are
@@ -273,7 +273,7 @@ TEST_P(TcpClientListenerTest, ClientConnection) {
client_addr_len));
// since the connection is handled on another thread, wait for some time
- EXPECT_TRUE(waiter.WaitFor(1, kConnectionCreatedTimeoutMsec));
+ EXPECT_TRUE(waiter->WaitFor(1, kConnectionCreatedTimeoutMsec));
close(s);
diff --git a/src/components/transport_manager/test/transport_manager_impl_test.cc b/src/components/transport_manager/test/transport_manager_impl_test.cc
index 227367e750..52ef63f874 100644
--- a/src/components/transport_manager/test/transport_manager_impl_test.cc
+++ b/src/components/transport_manager/test/transport_manager_impl_test.cc
@@ -555,11 +555,11 @@ TEST_F(TransportManagerImplTest, SendMessageToDevice) {
// Arrange
HandleConnection();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_adapter_,
SendData(mac_address_, application_id_, test_message_))
.WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(TransportAdapter::OK)));
+ DoAll(NotifyTestAsyncWaiter(waiter), Return(TransportAdapter::OK)));
#ifdef TELEMETRY_MONITOR
EXPECT_CALL(mock_metric_observer_, StartRawMsg(test_message_.get()));
@@ -567,7 +567,7 @@ TEST_F(TransportManagerImplTest, SendMessageToDevice) {
EXPECT_EQ(E_SUCCESS, tm_.SendMessageToDevice(test_message_));
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, SendMessageToDevice_SendingFailed) {
@@ -578,30 +578,30 @@ TEST_F(TransportManagerImplTest, SendMessageToDevice_SendingFailed) {
EXPECT_CALL(mock_metric_observer_, StartRawMsg(_));
#endif // TELEMETRY_MONITOR
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_adapter_,
SendData(mac_address_, application_id_, test_message_))
.WillOnce(Return(TransportAdapter::FAIL));
EXPECT_CALL(*tm_listener_, OnTMMessageSendFailed(_, test_message_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
EXPECT_EQ(E_SUCCESS, tm_.SendMessageToDevice(test_message_));
#ifdef TELEMETRY_MONITOR
EXPECT_CALL(mock_metric_observer_, StopRawMsg(_)).Times(0);
#endif // TELEMETRY_MONITOR
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, SendMessageToDevice_StartTimeObserver) {
// Arrange
HandleConnection();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_adapter_,
SendData(mac_address_, application_id_, test_message_))
.WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(TransportAdapter::OK)));
+ DoAll(NotifyTestAsyncWaiter(waiter), Return(TransportAdapter::OK)));
#ifdef TELEMETRY_MONITOR
EXPECT_CALL(mock_metric_observer_, StartRawMsg(_));
@@ -609,18 +609,18 @@ TEST_F(TransportManagerImplTest, SendMessageToDevice_StartTimeObserver) {
EXPECT_EQ(E_SUCCESS, tm_.SendMessageToDevice(test_message_));
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, SendMessageToDevice_SendDone) {
// Arrange
HandleConnection();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_adapter_,
SendData(mac_address_, application_id_, test_message_))
.WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(TransportAdapter::OK)));
+ DoAll(NotifyTestAsyncWaiter(waiter), Return(TransportAdapter::OK)));
#ifdef TELEMETRY_MONITOR
EXPECT_CALL(mock_metric_observer_, StartRawMsg(test_message_.get()));
@@ -630,7 +630,7 @@ TEST_F(TransportManagerImplTest, SendMessageToDevice_SendDone) {
HandleSendDone();
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(
@@ -639,11 +639,11 @@ TEST_F(
// Arrange
HandleConnection();
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_adapter_,
SendData(mac_address_, application_id_, test_message_))
.WillOnce(
- DoAll(NotifyTestAsyncWaiter(&waiter), Return(TransportAdapter::OK)));
+ DoAll(NotifyTestAsyncWaiter(waiter), Return(TransportAdapter::OK)));
#ifdef TELEMETRY_MONITOR
EXPECT_CALL(mock_metric_observer_, StartRawMsg(test_message_.get()));
@@ -654,7 +654,7 @@ TEST_F(
HandleSendFailed();
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, RemoveDevice_DeviceWasAdded) {
@@ -749,7 +749,7 @@ TEST_F(TransportManagerImplTest, UpdateDeviceList_RemoveDevice) {
* Tests which check correct handling and receiving events
*/
TEST_F(TransportManagerImplTest, ReceiveEventFromDevice_OnSearchDeviceDone) {
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
TransportAdapterEvent test_event(EventTypeEnum::ON_SEARCH_DONE,
mock_adapter_,
mac_address_,
@@ -758,15 +758,15 @@ TEST_F(TransportManagerImplTest, ReceiveEventFromDevice_OnSearchDeviceDone) {
error_);
EXPECT_CALL(*tm_listener_, OnScanDevicesFinished())
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
tm_.ReceiveEventFromDevice(test_event);
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, ReceiveEventFromDevice_OnSearchDeviceFail) {
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
TransportAdapterEvent test_event(EventTypeEnum::ON_SEARCH_FAIL,
mock_adapter_,
mac_address_,
@@ -775,11 +775,11 @@ TEST_F(TransportManagerImplTest, ReceiveEventFromDevice_OnSearchDeviceFail) {
error_);
EXPECT_CALL(*tm_listener_, OnScanDevicesFailed(_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
tm_.ReceiveEventFromDevice(test_event);
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, ReceiveEventFromDevice_DeviceListUpdated) {
@@ -793,7 +793,7 @@ TEST_F(TransportManagerImplTest, ReceiveEventFromDevice_DeviceListUpdated) {
std::vector<DeviceInfo> vector_dev_info;
vector_dev_info.push_back(dev_info_);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*mock_adapter_, GetDeviceList())
.Times(AtLeast(1))
.WillRepeatedly(Return(device_list_));
@@ -805,14 +805,14 @@ TEST_F(TransportManagerImplTest, ReceiveEventFromDevice_DeviceListUpdated) {
.WillRepeatedly(Return(dev_info_.connection_type()));
EXPECT_CALL(*tm_listener_, OnDeviceFound(dev_info_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
EXPECT_CALL(*tm_listener_, OnDeviceAdded(dev_info_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
tm_.ReceiveEventFromDevice(test_event);
device_list_.pop_back();
- EXPECT_TRUE(waiter.WaitFor(2, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(2, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, CheckEvents) {
@@ -972,13 +972,13 @@ TEST_F(TransportManagerImplTest, HandleMessage_ConnectionNotExist) {
SendData(mac_address_, application_id_, test_message_))
.Times(0);
- TestAsyncWaiter waiter;
+ auto waiter = TestAsyncWaiter::createInstance();
EXPECT_CALL(*tm_listener_, OnTMMessageSendFailed(_, test_message_))
- .WillOnce(NotifyTestAsyncWaiter(&waiter));
+ .WillOnce(NotifyTestAsyncWaiter(waiter));
tm_.TestHandle(test_message_);
- EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
+ EXPECT_TRUE(waiter->WaitFor(1, kAsyncExpectationsTimeout));
}
TEST_F(TransportManagerImplTest, SearchDevices_TMIsNotInitialized) {
diff --git a/tools/InterfaceGenerator/generator/generators/PolicyTypes.py b/tools/InterfaceGenerator/generator/generators/PolicyTypes.py
index 53c3062f30..116273d82c 100644
--- a/tools/InterfaceGenerator/generator/generators/PolicyTypes.py
+++ b/tools/InterfaceGenerator/generator/generators/PolicyTypes.py
@@ -441,7 +441,7 @@ class CodeGenerator(object):
is True else u"// {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.description)])
- if description is not u"":
+ if description != u"":
description = u"".join([u" *\n" if use_doxygen
is True else u"//\n", description])
@@ -451,7 +451,7 @@ class CodeGenerator(object):
self._normalize_multiline_comments(
interface_item_base.
design_description)])
- if design_description is not u"":
+ if design_description != u"":
design_description = u"".join([u" *\n" if use_doxygen is
True else "//\n",
design_description])
@@ -460,7 +460,7 @@ class CodeGenerator(object):
True else u"// Note: {0}\n").format(x)
for x in self._normalize_multiline_comments(
[x.value for x in interface_item_base.issues])])
- if issues is not u"":
+ if issues != u"":
issues = u"".join([u" *\n" if use_doxygen is
True else u"//\n", issues])
@@ -468,7 +468,7 @@ class CodeGenerator(object):
True else u"// ToDo: {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.todos)])
- if todos is not u"":
+ if todos != u"":
todos = u"".join([u" *\n" if use_doxygen is
True else u"//\n", todos])
@@ -505,7 +505,7 @@ class CodeGenerator(object):
return u"".join(
[u"{0}{1}\n".format(
self._indent_template * indent_level,
- x) if x is not u"" else u"\n" for x in code_lines])
+ x) if x != u"" else u"\n" for x in code_lines])
@staticmethod
def _normalize_multiline_comments(initial_strings):
diff --git a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
index 73ab03f205..bec5912d54 100755
--- a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
+++ b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
@@ -758,7 +758,7 @@ class CodeGenerator(object):
result_array = []
result_array.append(self._impl_code_shared_ptr_vector_template.substitute(var_name = name))
result = u"\n".join(result_array)
- if result is not "":
+ if result != "":
result += u"\n\n"
return result
@@ -789,7 +789,7 @@ class CodeGenerator(object):
count += 1
result = u"\n\n".join(result_array)
- if result is not "":
+ if result != "":
result += u"\n\n"
return result
@@ -1415,7 +1415,7 @@ class CodeGenerator(object):
is True else u"// {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.description)])
- if description is not u"":
+ if description != u"":
description = u"".join([u" *\n" if use_doxygen
is True else u"//\n", description])
@@ -1425,7 +1425,7 @@ class CodeGenerator(object):
self._normalize_multiline_comments(
interface_item_base.
design_description)])
- if design_description is not u"":
+ if design_description != u"":
design_description = u"".join([u" *\n" if use_doxygen is
True else "//\n",
design_description])
@@ -1434,7 +1434,7 @@ class CodeGenerator(object):
True else u"// Note: {0}\n").format(x)
for x in self._normalize_multiline_comments(
[x.value for x in interface_item_base.issues])])
- if issues is not u"":
+ if issues != u"":
issues = u"".join([u" *\n" if use_doxygen is
True else u"//\n", issues])
@@ -1442,7 +1442,7 @@ class CodeGenerator(object):
True else u"// ToDo: {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.todos)])
- if todos is not u"":
+ if todos != u"":
todos = u"".join([u" *\n" if use_doxygen is
True else u"//\n", todos])
@@ -1479,7 +1479,7 @@ class CodeGenerator(object):
return u"".join(
[u"{0}{1}\n".format(
self._indent_template * indent_level,
- x) if x is not u"" else u"\n" for x in code_lines])
+ x) if x != u"" else u"\n" for x in code_lines])
@staticmethod
def _normalize_multiline_comments(initial_strings):
diff --git a/tools/intergen/test/test_hmi_interface.xml b/tools/intergen/test/test_hmi_interface.xml
index 7573d35ef9..c5978c543c 100644
--- a/tools/intergen/test/test_hmi_interface.xml
+++ b/tools/intergen/test/test_hmi_interface.xml
@@ -456,9 +456,6 @@
<element name="totalDistance">
<description> Total distance to destination for navigation</description>
</element>
- <element name="navigationText">
- <description>Navigation text for UpdateTurnList.</description>
- </element>
<element name="audioPassThruDisplayText1">
<description> First line of text for audio pass thru</description>
</element>
@@ -471,9 +468,6 @@
<element name="sliderFooter">
<description> Footer text for slider</description>
</element>
- <element name="notificationText">
- <description>Text of notification to be displayed on screen.</description>
- </element>
<element name="menuName">
<description> Primary text for Choice</description>
</element>
diff --git a/tools/rpc_spec b/tools/rpc_spec
-Subproject 6321c2ca8ea3a028b1675643e41ac51349cc270
+Subproject d1401e31ae3cb183a5a344064046ffa55334620