summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Antonov <vlantonov@luxoft.com>2016-05-28 16:00:53 +0300
committerLevchenko <slevchenko@SLevchenko-lws-unq>2016-08-03 17:54:53 +0300
commita84b8ffa40d7ce29069716da0df9438e8360890e (patch)
treea3237051d1bf18a0e2e6fd13e88fc0e7638f5d52
parentedbd60ed69fcbcd5913ebdb45783e248dd065abe (diff)
downloadsdl_core-a84b8ffa40d7ce29069716da0df9438e8360890e.tar.gz
AppLaunch ini file modifications
Related issue : APPLINK-24892
-rw-r--r--src/appMain/smartDeviceLink.ini17
-rw-r--r--src/components/application_manager/test/smartDeviceLink_test.ini16
-rw-r--r--src/components/config_profile/include/config_profile/profile.h53
-rw-r--r--src/components/config_profile/src/profile.cc104
-rw-r--r--src/components/config_profile/test/smartDeviceLink.ini16
-rw-r--r--src/components/config_profile/test/smartDeviceLink_invalid_boolean.ini16
-rw-r--r--src/components/config_profile/test/smartDeviceLink_invalid_int.ini16
-rw-r--r--src/components/config_profile/test/smartDeviceLink_invalid_pairs.ini16
-rw-r--r--src/components/config_profile/test/smartDeviceLink_invalid_string.ini16
-rw-r--r--src/components/config_profile/test/smartDeviceLink_test.ini16
-rw-r--r--src/components/include/application_manager/app_launch_settings.h22
-rw-r--r--src/components/include/test/application_manager/mock_app_launch_settings.h60
-rw-r--r--src/components/transport_manager/test/smartDeviceLink_test.ini15
13 files changed, 375 insertions, 8 deletions
diff --git a/src/appMain/smartDeviceLink.ini b/src/appMain/smartDeviceLink.ini
index a9baf8c45a..c5cd4dab8e 100644
--- a/src/appMain/smartDeviceLink.ini
+++ b/src/appMain/smartDeviceLink.ini
@@ -238,3 +238,20 @@ UseDBForResumption = false
AttemptsToOpenResumptionDB = 5
; Timeout between attempts during opening DB in milliseconds
OpenAttemptTimeoutMsResumptionDB = 500
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true
+
diff --git a/src/components/application_manager/test/smartDeviceLink_test.ini b/src/components/application_manager/test/smartDeviceLink_test.ini
index c544a6e02d..48f4d2c808 100644
--- a/src/components/application_manager/test/smartDeviceLink_test.ini
+++ b/src/components/application_manager/test/smartDeviceLink_test.ini
@@ -37,3 +37,19 @@ AttemptsToOpenResumptionDB = 5
# Timeout between attempts during opening DB in milliseconds
OpenAttemptTimeoutMsResumptionDB = 500
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index 5abf8a9f78..bbbdaf4f7d 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -271,13 +271,13 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
* @brief Returns timeout for SDL to wait for the next package of raw data
* over audio service
*/
- const std::uint32_t audio_data_stopped_timeout() const;
+ const uint32_t audio_data_stopped_timeout() const;
/**
* @brief Returns timeout for SDL to wait for the next package of raw data
* over video service
*/
- const std::uint32_t video_data_stopped_timeout() const;
+ const uint32_t video_data_stopped_timeout() const;
/**
* @brief Returns allowable max amount of requests per time scale for
@@ -582,6 +582,44 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
*/
uint16_t open_attempt_timeout_ms_resumption_db() const;
+ /**
+ * @brief Returns wait time after device connection
+ * before app launch request
+ */
+ const uint16_t app_launch_wait_time() const OVERRIDE;
+
+ /**
+ * @brief Returns max number of attempts to launch an application
+ * after device connection
+ */
+ const uint16_t app_launch_max_retry_attempt() const OVERRIDE;
+
+ /**
+ * @brief Returns wait time before next app launch request
+ */
+ const uint16_t app_launch_retry_wait_time() const OVERRIDE;
+
+ /**
+ * @brief Returns max number of failed iOS app
+ * registration requests
+ */
+ const uint16_t remove_bundle_id_attempts() const OVERRIDE;
+
+ /**
+ * @brief Returns max number of iOS devices to be stored
+ */
+ const uint16_t max_number_of_ios_device() const OVERRIDE;
+
+ /**
+ * @brief Returns wait time before attempt to launch next app
+ */
+ const uint16_t wait_time_between_apps() const OVERRIDE;
+
+ /**
+ * @brief Returns status of feature of app launch on iOS
+ */
+ const bool enable_app_launch_ios() const OVERRIDE;
+
/*
* @brief Updates all related values from ini file
*/
@@ -752,8 +790,8 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
std::string system_files_path_;
uint16_t transport_manager_tcp_adapter_port_;
std::string tts_delimiter_;
- std::uint32_t audio_data_stopped_timeout_;
- std::uint32_t video_data_stopped_timeout_;
+ uint32_t audio_data_stopped_timeout_;
+ uint32_t video_data_stopped_timeout_;
std::string mme_db_name_;
std::string event_mq_name_;
std::string ack_mq_name_;
@@ -810,6 +848,13 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
bool use_db_for_resumption_;
uint16_t attempts_to_open_resumption_db_;
uint16_t open_attempt_timeout_ms_resumption_db_;
+ uint16_t app_launch_wait_time_;
+ uint16_t app_launch_max_retry_attempt_;
+ uint16_t app_launch_retry_wait_time_;
+ uint16_t remove_bundle_id_attempts_;
+ uint16_t max_number_of_ios_device_;
+ uint16_t wait_time_between_apps_;
+ bool enable_app_launch_ios_;
DISALLOW_COPY_AND_ASSIGN(Profile);
};
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index 4eacbe88ec..6806cf1138 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -84,6 +84,7 @@ const char* kIAPSection = "IAP";
const char* kProtocolHandlerSection = "ProtocolHandler";
const char* kSDL4Section = "SDL4";
const char* kResumptionSection = "Resumption";
+const char* kAppLaunchSection = "AppLaunch";
const char* kSDLVersionKey = "SDLVersion";
const char* kHmiCapabilitiesKey = "HMICapabilities";
@@ -102,7 +103,6 @@ const char* kAppIconsFolderKey = "AppIconsFolder";
const char* kAppIconsFolderMaxSizeKey = "AppIconsFolderMaxSize";
const char* kAppIconsAmountToRemoveKey = "AppIconsAmountToRemove";
const char* kLaunchHMIKey = "LaunchHMI";
-
const char* kDefaultSDLVersion = "";
#ifdef WEB_HMI
const char* kLinkToWebHMI = "LinkToWebHMI";
@@ -197,6 +197,13 @@ const char* kAttemptsToOpenResumptionDBKey = "AttemptsToOpenResumptionDB";
const char* kOpenAttemptTimeoutMsResumptionDBKey =
"OpenAttemptTimeoutMsResumptionDB";
+const char* kAppLaunchWaitTimeKey = "AppLaunchWaitTime";
+const char* kAppLaunchMaxRetryAttemptKey = "AppLaunchMaxRetryAttempt";
+const char* kAppLaunchRetryWaitTimeKey = "AppLaunchRetryWaitTime";
+const char* kRemoveBundleIDattemptsKey = "RemoveBundleIDattempts";
+const char* kMaxNumberOfiOSDeviceKey = "MaxNumberOfiOSDevice";
+const char* kWaitTimeBetweenAppsKey = "WaitTimeBetweenApps";
+const char* kEnableAppLaunchIOSKey = "EnableAppLaunchIOS";
#ifdef WEB_HMI
const char* kDefaultLinkToWebHMI = "HMI/index.html";
#endif // WEB_HMI
@@ -278,6 +285,13 @@ const uint32_t kDefaultAppIconsFolderMaxSize = 104857600;
const uint32_t kDefaultAppIconsAmountToRemove = 1;
const uint16_t kDefaultAttemptsToOpenResumptionDB = 5;
const uint16_t kDefaultOpenAttemptTimeoutMsResumptionDB = 500;
+const uint16_t kDefaultAppLaunchWaitTime = 5000;
+const uint16_t kDefaultAppLaunchMaxRetryAttempt = 3;
+const uint16_t kDefaultAppLaunchRetryWaitTime = 15000;
+const uint16_t kDefaultRemoveBundleIDattempts = 3;
+const uint16_t kDefaultMaxNumberOfiOSDevice = 10;
+const uint16_t kDefaultWaitTimeBetweenApps = 4000;
+const bool kDefaultEnableAppLaunchIOS = true;
} // namespace
namespace profile {
@@ -359,7 +373,18 @@ Profile::Profile()
, use_db_for_resumption_(false)
, attempts_to_open_resumption_db_(kDefaultAttemptsToOpenResumptionDB)
, open_attempt_timeout_ms_resumption_db_(
- kDefaultOpenAttemptTimeoutMsResumptionDB) {
+ kDefaultOpenAttemptTimeoutMsResumptionDB)
+ , app_launch_wait_time_(kDefaultAppLaunchWaitTime)
+ , app_launch_max_retry_attempt_(kDefaultAppLaunchMaxRetryAttempt)
+ , app_launch_retry_wait_time_(kDefaultAppLaunchRetryWaitTime)
+ , remove_bundle_id_attempts_(kDefaultRemoveBundleIDattempts)
+ , max_number_of_ios_device_(kDefaultMaxNumberOfiOSDevice)
+ , wait_time_between_apps_(kDefaultWaitTimeBetweenApps)
+ , enable_app_launch_ios_(kDefaultEnableAppLaunchIOS)
+{
+ // SDL version
+ ReadStringValue(
+ &sdl_version_, kDefaultSDLVersion, kMainSection, kSDLVersionKey);
}
Profile::~Profile() {}
@@ -525,11 +550,11 @@ const std::string& Profile::audio_stream_file() const {
return audio_stream_file_;
}
-const std::uint32_t Profile::audio_data_stopped_timeout() const {
+const uint32_t Profile::audio_data_stopped_timeout() const {
return audio_data_stopped_timeout_;
}
-const std::uint32_t Profile::video_data_stopped_timeout() const {
+const uint32_t Profile::video_data_stopped_timeout() const {
return video_data_stopped_timeout_;
}
@@ -822,6 +847,34 @@ uint16_t Profile::open_attempt_timeout_ms_resumption_db() const {
return open_attempt_timeout_ms_resumption_db_;
}
+const uint16_t Profile::app_launch_max_retry_attempt() const {
+ return app_launch_max_retry_attempt_;
+}
+
+const uint16_t Profile::app_launch_retry_wait_time() const {
+ return app_launch_retry_wait_time_;
+}
+
+const uint16_t Profile::app_launch_wait_time() const {
+ return app_launch_wait_time_;
+}
+
+const bool Profile::enable_app_launch_ios() const {
+ return enable_app_launch_ios_;
+}
+
+const uint16_t Profile::max_number_of_ios_device() const {
+ return max_number_of_ios_device_;
+}
+
+const uint16_t Profile::remove_bundle_id_attempts() const {
+ return remove_bundle_id_attempts_;
+}
+
+const uint16_t Profile::wait_time_between_apps() const {
+ return wait_time_between_apps_;
+}
+
void Profile::UpdateValues() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -1680,6 +1733,49 @@ void Profile::UpdateValues() {
LOG_UPDATED_VALUE(open_attempt_timeout_ms_resumption_db_,
kOpenAttemptTimeoutMsResumptionDBKey,
kResumptionSection);
+
+ // Read parameters from App Launch section
+ ReadUIntValue(&app_launch_wait_time_, kDefaultAppLaunchWaitTime,
+ kAppLaunchSection, kAppLaunchWaitTimeKey);
+
+ LOG_UPDATED_VALUE(app_launch_wait_time_, kAppLaunchWaitTimeKey,
+ kAppLaunchSection);
+
+ ReadUIntValue(&app_launch_max_retry_attempt_, kDefaultAppLaunchMaxRetryAttempt,
+ kAppLaunchSection, kAppLaunchMaxRetryAttemptKey);
+
+ LOG_UPDATED_VALUE(app_launch_max_retry_attempt_, kAppLaunchMaxRetryAttemptKey,
+ kAppLaunchSection);
+
+ ReadUIntValue(&app_launch_retry_wait_time_, kDefaultAppLaunchRetryWaitTime,
+ kAppLaunchSection, kAppLaunchRetryWaitTimeKey);
+
+ LOG_UPDATED_VALUE(app_launch_retry_wait_time_, kAppLaunchRetryWaitTimeKey,
+ kAppLaunchSection);
+
+ ReadUIntValue(&remove_bundle_id_attempts_, kDefaultRemoveBundleIDattempts,
+ kAppLaunchSection, kRemoveBundleIDattemptsKey);
+
+ LOG_UPDATED_VALUE(remove_bundle_id_attempts_, kRemoveBundleIDattemptsKey,
+ kAppLaunchSection);
+
+ ReadUIntValue(&max_number_of_ios_device_, kDefaultMaxNumberOfiOSDevice,
+ kAppLaunchSection, kMaxNumberOfiOSDeviceKey);
+
+ LOG_UPDATED_VALUE(max_number_of_ios_device_, kMaxNumberOfiOSDeviceKey,
+ kAppLaunchSection);
+
+ ReadUIntValue(&wait_time_between_apps_, kDefaultWaitTimeBetweenApps,
+ kAppLaunchSection, kWaitTimeBetweenAppsKey);
+
+ LOG_UPDATED_VALUE(wait_time_between_apps_, kWaitTimeBetweenAppsKey,
+ kAppLaunchSection);
+
+ ReadBoolValue(&enable_app_launch_ios_, kDefaultEnableAppLaunchIOS,
+ kAppLaunchSection, kEnableAppLaunchIOSKey);
+
+ LOG_UPDATED_BOOL_VALUE(enable_app_launch_ios_, kEnableAppLaunchIOSKey,
+ kAppLaunchSection);
}
bool Profile::ReadValue(bool* value,
diff --git a/src/components/config_profile/test/smartDeviceLink.ini b/src/components/config_profile/test/smartDeviceLink.ini
index 41dabaa530..6ea131b095 100644
--- a/src/components/config_profile/test/smartDeviceLink.ini
+++ b/src/components/config_profile/test/smartDeviceLink.ini
@@ -183,3 +183,19 @@ ResumptionDelayBeforeIgn = 30;
# Timeout in seconds to restore hmi_level for media app after sdl run
ResumptionDelayAfterIgn = 30;
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true
diff --git a/src/components/config_profile/test/smartDeviceLink_invalid_boolean.ini b/src/components/config_profile/test/smartDeviceLink_invalid_boolean.ini
index 560fb5117a..f93fa39597 100644
--- a/src/components/config_profile/test/smartDeviceLink_invalid_boolean.ini
+++ b/src/components/config_profile/test/smartDeviceLink_invalid_boolean.ini
@@ -183,3 +183,19 @@ ResumptionDelayBeforeIgn = 30;
# Timeout in seconds to restore hmi_level for media app after sdl run
ResumptionDelayAfterIgn = 30;
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true \ No newline at end of file
diff --git a/src/components/config_profile/test/smartDeviceLink_invalid_int.ini b/src/components/config_profile/test/smartDeviceLink_invalid_int.ini
index 76bcc5a0f0..9c88a8950c 100644
--- a/src/components/config_profile/test/smartDeviceLink_invalid_int.ini
+++ b/src/components/config_profile/test/smartDeviceLink_invalid_int.ini
@@ -185,3 +185,19 @@ ResumptionDelayBeforeIgn = 30;
# Timeout in seconds to restore hmi_level for media app after sdl run
ResumptionDelayAfterIgn = 30;
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true \ No newline at end of file
diff --git a/src/components/config_profile/test/smartDeviceLink_invalid_pairs.ini b/src/components/config_profile/test/smartDeviceLink_invalid_pairs.ini
index 1507b2a84c..b389b0b492 100644
--- a/src/components/config_profile/test/smartDeviceLink_invalid_pairs.ini
+++ b/src/components/config_profile/test/smartDeviceLink_invalid_pairs.ini
@@ -185,3 +185,19 @@ ResumptionDelayBeforeIgn = 30;
# Timeout in seconds to restore hmi_level for media app after sdl run
ResumptionDelayAfterIgn = 30;
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true \ No newline at end of file
diff --git a/src/components/config_profile/test/smartDeviceLink_invalid_string.ini b/src/components/config_profile/test/smartDeviceLink_invalid_string.ini
index 6669b580c5..f18b43cb41 100644
--- a/src/components/config_profile/test/smartDeviceLink_invalid_string.ini
+++ b/src/components/config_profile/test/smartDeviceLink_invalid_string.ini
@@ -188,3 +188,19 @@ ResumptionDelayBeforeIgn = 30;
# Timeout in seconds to restore hmi_level for media app after sdl run
ResumptionDelayAfterIgn = 30;
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true \ No newline at end of file
diff --git a/src/components/config_profile/test/smartDeviceLink_test.ini b/src/components/config_profile/test/smartDeviceLink_test.ini
index 6e2943b569..9791544e16 100644
--- a/src/components/config_profile/test/smartDeviceLink_test.ini
+++ b/src/components/config_profile/test/smartDeviceLink_test.ini
@@ -190,3 +190,19 @@ ResumptionDelayBeforeIgn = 30;
# Timeout in seconds to restore hmi_level for media app after sdl run
ResumptionDelayAfterIgn = 30;
+
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true
diff --git a/src/components/include/application_manager/app_launch_settings.h b/src/components/include/application_manager/app_launch_settings.h
new file mode 100644
index 0000000000..65d15fb49b
--- /dev/null
+++ b/src/components/include/application_manager/app_launch_settings.h
@@ -0,0 +1,22 @@
+#ifndef SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_APP_LAUNCH_SETTINGS_H_
+#define SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_APP_LAUNCH_SETTINGS_H_
+
+#include <stdint.h>
+#include <string>
+namespace app_launch {
+class AppLaunchSettings {
+ public:
+ virtual const uint16_t app_launch_wait_time() const = 0;
+ virtual const uint16_t app_launch_max_retry_attempt() const = 0;
+ virtual const uint16_t app_launch_retry_wait_time() const = 0;
+ virtual const uint16_t remove_bundle_id_attempts() const = 0;
+ virtual const uint16_t max_number_of_ios_device() const = 0;
+ virtual const uint16_t wait_time_between_apps() const = 0;
+ virtual const bool enable_app_launch_ios() const = 0;
+ virtual uint32_t resumption_delay_after_ign() const = 0;
+ virtual const std::string& app_storage_folder() const = 0;
+};
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_INCLUDE_APPLICATION_MANAGER_APP_LAUNCH_SETTINGS_H_
diff --git a/src/components/include/test/application_manager/mock_app_launch_settings.h b/src/components/include/test/application_manager/mock_app_launch_settings.h
new file mode 100644
index 0000000000..41ad3df8d3
--- /dev/null
+++ b/src/components/include/test/application_manager/mock_app_launch_settings.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2016, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_APP_LAUNCH_SETTINGS_H_
+#define SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_APP_LAUNCH_SETTINGS_H_
+
+#include <string>
+#include "gmock/gmock.h"
+#include "application_manager/app_launch_settings.h"
+
+namespace test {
+namespace components {
+namespace test_app_launch {
+
+class MockAppLaunchSettings : public app_launch::AppLaunchSettings {
+ public:
+ MOCK_CONST_METHOD0(app_launch_wait_time, const uint16_t());
+ MOCK_CONST_METHOD0(app_launch_max_retry_attempt, const uint16_t());
+ MOCK_CONST_METHOD0(app_launch_retry_wait_time, const uint16_t());
+ MOCK_CONST_METHOD0(remove_bundle_id_attempts, const uint16_t());
+ MOCK_CONST_METHOD0(max_number_of_ios_device, const uint16_t());
+ MOCK_CONST_METHOD0(wait_time_between_apps, const uint16_t());
+ MOCK_CONST_METHOD0(enable_app_launch_ios, const bool());
+ MOCK_CONST_METHOD0(resumption_delay_after_ign, uint32_t());
+ MOCK_CONST_METHOD0(app_storage_folder, std::string&());
+};
+} // namespace test_app_launch
+} // namespace components
+} // namespace test
+
+#endif // SRC_COMPONENTS_INCLUDE_TEST_APPLICATION_MANAGER_MOCK_APP_LAUNCH_SETTINGS_H_
diff --git a/src/components/transport_manager/test/smartDeviceLink_test.ini b/src/components/transport_manager/test/smartDeviceLink_test.ini
index 40aeb5a019..6fc8ab63ec 100644
--- a/src/components/transport_manager/test/smartDeviceLink_test.ini
+++ b/src/components/transport_manager/test/smartDeviceLink_test.ini
@@ -53,3 +53,18 @@ ResumptionDelayAfterIgn = 30;
# Resumption ctrl uses JSON if UseDBForResumption=false for store data otherwise uses DB
UseDBForResumption = false
+[AppLaunch]
+; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
+AppLaunchWaitTime = 5000
+; the number of times SDL attempts to launch an application after device connection - applied separately to each application from the given device
+AppLaunchMaxRetryAttempt = 3
+; time in milliseconds started by SDL after app launch request. if expired and app did not register, SDL sends new launch request. applied separately to each app
+AppLaunchRetryWaitTime = 15000
+; the number of the given device connections that the requested application failed to register after SDL's launch attempts - SDL removes app's bundleID on "value + 1" device connection
+RemoveBundleIDattempts = 3
+; the maximum number of iOS devices for which entries can be remembered by SDL
+MaxNumberOfiOSDevice = 10
+; time in milliseconds started after request to launch the first app. after either expires or the first app registers SDL requests to launch the second app.
+WaitTimeBetweenApps = 4000
+; App Launch on iOS devices SDL feature enabler/disabler
+EnableAppLaunchIOS = true