summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'release/7.0.0' into ↵Yana Chernysheva2020-10-0220-612/+240
|\ | | | | | | fix/move_duplicate_conversion_functions_to_message_helper
| * Fix Cppcheck issues (#3453)Yana Chernysheva (GitHub)2020-10-0119-94/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix noExplicitConstructor issue * Fix functionConst issues * Fix unusedFunction and unusedField issues * Fix redundantInitialization * Fix unreadVariable and unusedVariable issues * Fix postfixOperator issue * Fix variableScope issue * Fix invalidPrintfArgType_sint and unsignedLessThanZero issues * Fix other errors * Add changes, related to functions marked as unused * Fix new issues * Fixe review comment * Fix codestyle * Fix constParameter errors * Fix functionConst errors * Fix noExplicitConstructor, redundantInitialization errors * Fix unreadVariable errors * Fix shadowVariable error * Fix useStlAlgorithm errors * Fixe variableScope error, add FIXME comment * Fix code style * Fix compile error * Remove unsued function * Fix compile error Co-authored-by: Vladislav Semenyuk <vsemenyuk@luxoft.com>
| * Use atomic bool in ApplicatinManager (#3491)Andrii Kalinich (GitHub)2020-09-301-8/+3
| | | | | | | | | | Replace bool flag 'is_stopping_' in class ApplicationManagerImpl and remove mutex 'stopping_application_mng_lock_'.
| * Replace direct access with accessor for apps (#3487)Andrii Kalinich (GitHub)2020-09-301-17/+21
| | | | | | | | | | | | | | | | | | There was found a few places inside of ApplicationManager where `applications_` and `apps_to_register_` members were used without locks however these members are commonly used and must be synchronized in all places. To avoid potential data races, direct usage of these elements were replaced with accessor for read-only operations. Also was added a missing lock.
| * Merge pull request #3510 from ↵Jacob Keeler2020-09-291-475/+62
| |\ | | | | | | | | | | | | LuxoftSDL/fix/fix_enums_conversion_in_hmi_capabilities Fix/fix enums conversion in hmi capabilities
| | * Fix enum conversion in HMI capabilitiesAndrii Kalinich2020-09-221-475/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | There were found a couple of hardcoded HMI capabity enum to string values and some of them were outdated. This legacy code can be easily replaced with the templated function supplied from generated API. By that reason, all hardcoded pairs and maps were removed and replaced with a common function.
| * | Merge pull request #3507 from smartdevicelink/fix/coverity_7.0Jacob Keeler2020-09-211-2/+2
| |\ \ | | |/ | |/| Add fixes for new Coverity issues
| | * Add fixes for new Coverity issuesfix/coverity_7.0jacobkeeler2020-09-171-2/+2
| | | | | | | | | | | | Fixes CID 214309, 214305, 214304
| * | Fix/Delay OnHMIStatus until RAI response is sent (#3506)Shobhit Adlakha2020-09-213-16/+91
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add is_ready flag to apps and handle sending OnHMIStatus after RAI response * Add mock functions * Address review comments * Only send delayed onHMIStatus if RAI was a success * Prevent secondary hmi level none to cloud apps * Move enabled check to last when init new cloud app Co-authored-by: JackLivio <jack@livio.io>
* | Merge branch 'develop' into ↵Yana Chernysheva2020-09-1051-3387/+4686
|\ \ | |/ | | | | fix/move_duplicate_conversion_functions_to_message_helper
| * [SDL-0188] Interior Vehicle Data Resumption (#3480)Ira Lytvynenko (GitHub)2020-09-042-6/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add changes related to AppExtension and RCAppExtension * Change OnTimeOut() method in affected requests * Add changes related to ApplicationHelper class * Add changes related to EventDispatcher * Fill subscription data for all pending requests Changed SDL logic to update subscription results for each pending subscription request before notifying resumption processor about current subscription is processed. This should be done beforehand because after raising event to processor it can finish resumption process and if it has failed then it can trigger sending of the next subscription request. So at that point, each subscription request should contain updated subscriptions status, otherwise some redundant requests might be sent. * Add RC data to resumption data processor * Add RCPendingResumptionHandler class * Process timeout for get interior vehicle data * Revert Interior vehicle data * Add resumption logic to RC app extension * Resumption logic in RC plugin * Helpers RC functions * Update hash for RC data * Filter RC subscriptions in vehicle data plugin * UTs for the RCPendingResumptionHandler Co-authored-by: Yana Chernysheva <ychernysheva@luxoft.com> Co-authored-by: Andrii Kalinich (GitHub) <AKalinich@luxoft.com> Co-authored-by: Aleksandr Kutsan <AKutsan@luxoft.com> Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: sniukalov <sniukaov@luxoft.com> Co-authored-by: Dmitriy Boltovskiy <dboltovskyi@luxoft.com>
| * [SDL-0190] Handle response from HMI during resumption data (#3475)Yana Chernysheva (GitHub)2020-09-0413-484/+1908
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add changes to RAI request * Add new class ResumptionDataProcessor * Add new class SDLAppExtension * Add new class ExtensionPendingResumptionHandler * Add new class SDLPendingResumptionHandler * New class VehicleInfoPendingResumptionHandler * Add changes related to ApplicationManager class * Add changes related to MessageHelper class * Add changes related to StateController class * Add changes related to ResumeController class * Add changes related to PolicyHandler class * Add changes related to SDLRPCPlugin * Add changes related to VehicleInfoPlugin * Add changes related to AppServiceAppExtension and SystemCapabilitiesAppExtension * Add changes related to ResetGlobalProperties request * Add changes related to VehicleInfoAppExtension * Add changes related to AppExtension and RCAppExtension * Change OnTimeOut() method in affected requests * Add changes related to method IsAppSubscribedForWayPoints * Fix problem with multiple definitions during building of unit tests * Add changes related to ApplicationHelper class * Add changes related to EventDispatcher * Add changes related to OnSystemCapabilitiesUpdated notification * Fix/fix rai default timeout (#108) Fix RAI default timeout As RAI request does not depend on any HMI response there is no need to track any timeout for it. RAI request will be removed from/ RequestController queue upon RAI response which will be sent anyway Update UT * Do not unsubscribe from pending VD Update SDL logic to avoid sending of unsubscribeVD to HMI during vehicle data resumption for case when another application is also have pending subscription for the same vehicle data. * Fill subscription data for all pending requests Changed SDL logic to update subscription results for each pending subscription request before notifying resumption processor about current subscription is processed. This should be done beforehand because after raising event to processor it can finish resumption process and if it has failed then it can trigger sending of the next subscription request. So at that point, each subscription request should contain updated subscriptions status, otherwise some redundant requests might be sent. * fixup! Add new class ResumptionDataProcessor * fixup! Add new class SDLPendingResumptionHandler * fixup! Add new class ExtensionPendingResumptionHandler * fixup! New class VehicleInfoPendingResumptionHandler * fixup! Add changes to RAI request * fixup! Add new class ResumptionDataProcessor * fixup! Add new class SDLAppExtension * fixup! Add new class SDLPendingResumptionHandler * fixup! New class VehicleInfoPendingResumptionHandler * fixup! Add changes related to ApplicationManager class * fixup! Add changes related to MessageHelper class * fixup! Add changes related to ResumeController class * fixup! Add changes related to SDLRPCPlugin * fixup! Add changes related to AppExtension and RCAppExtension * fixup! Add changes related to AppServiceAppExtension and SystemCapabilitiesAppExtension * fixup! Add changes related to OnSystemCapabilitiesUpdated notification * fixup! Add changes related to ResumeController class * fixup! Change OnTimeOut() method in affected requests * fixup! fixup! Add new class SDLAppExtension * Filter RC subscriptions in vehicle data plugin * Timeout process for reset global properties * Use ResumptionDataProcessor interface instead of subscriber function * Rename ExtensionPendingResumptionHandler * Rename SDLAppExtension * Revert "Filter RC subscriptions in vehicle data plugin" This reverts commit f35e573e7587b06472e9f396d249339e8fc05cc8. * Rename resumption_data_processor.cc * Rename SDLPendingResumptionHandler * fixup! fixup! Add changes related to OnSystemCapabilitiesUpdated notification * fixup! fixup! Add changes related to AppServiceAppExtension and SystemCapabilitiesAppExtension * fixup! Use ResumptionDataProcessor interface instead of subscriber function Co-authored-by: Andrii Kalinich (GitHub) <AKalinich@luxoft.com> Co-authored-by: Aleksandr Kutsan <AKutsan@luxoft.com>
| * Overhaul state manager to handle regular state changes during hmi events (#3476)Jacob Keeler2020-09-043-129/+249
| | | | | | | | | | * Overhaul state manager to handle regular state changes during hmi events * Add parent check for all calls
| * Fix dangerous work with app commands (#3375)Alexander Kutsan (GitHub)2020-09-021-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SDLCORE-665: Fix dangerous work with app commands SDLCORE-665 There was related to a thread safety violation while working with application internal commands array. This array is a thread safe itself as it is protected with mutexes, however FindCommand() function is returing a raw pointer to an internal array element so the external component is able to get access to this element at any time even without locking the mutex. Core crash which was found in DeleteCommand request instance is happening by exactly the same reason - DeleteCommand is using a raw pointer to find the command, however this command might be destroyed from another thread at this point of time. As a result, working thread can access to a destroyed object by pointer. As a quick solution, each FindCommand() was followed by a command accessor which prevents unexpected command destruction. Working thread will use the temporary copy of command, but not command itself. However, the better solution would be to change a design and to avoid using of the raw pointers. * Update an Application class methods to return by value instead of raw pointer Updates the next methods: FindCommand FindSubMenu FindChoiceSet Updates related logic and Unit tests * fixup! Update an Application class methods to return by value instead of raw pointer * fixup! Update an Application class methods to return by value instead of raw pointer * Review fix: log that submenu already exist instead of not found * fixup! Update an Application class methods to return by value instead of raw pointer Co-authored-by: ZhdanovP <pzhdanov@luxoft.com> Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com>
| * App not Un-Registering when trying to Force Close Nav App (#3374)Alexander Kutsan (GitHub)2020-09-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * SYNC-62924: App not Un-Registering when trying to Force Close Nav App SYNC-62924 1. video_streaming_Lock acquired was not released when timeout and stop called from another thread happens at the same time 2. resumption timeout callback was waiting on Policy_Manager_lock_ which was not released, when acquired if resuming application is activated. 3. Crash observered when one thread accessing multiframe data and other thread deleting the mutliframe data due to disconnection Co-authored-by: asanka17 <asanka17@ford.com> Co-authored-by: YarikMamykin <ymamykin@luxoft.com> Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com>
| * [SDL 0046] Implement logger abstraction (#3472)VladSemenyuk2020-09-0148-2760/+2313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement logger abstraction. Integrate it to SDL. Create one logger instance for shared libraries * Rename all logger macros. * Update src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * Fix review comments(errors in log messages) * Fix review coments * Fix code style * Add logger variable creation to new commads * Fix review comment * Fixe review comment(class imblemtation moved to .cc file) Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
| * Fix SIGKILL due to not clearing the requestinfo set. (#3376)Alexander Kutsan (GitHub)2020-08-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SDLCORE-666: Fix SIGKILL due to not clearing the requestinfo set. SDLCORE-666 Added RequestInfoSet Destructor for properly clearing the time_sorted_pending_requests_ set to avoid double release of the same while destroying the RequestController Object. * Update fix for SIGKILL due to not clearing the requestinfo set - Change the RemoveRequest method on the Erase method in the RequestInfoSet destructor; - Remove redundant TestRequestsInfo collection in the Unit test Co-authored-by: Sidhartha <ssing314@ford.com> Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: Dmitriy Boltovskiy <dboltovskyi@luxoft.com>
| * Add check for result codes from HMI IsReady response (#3433)Yana Chernysheva (GitHub)2020-08-242-8/+49
| | | | | | | | | | | | | | | | | | * Add check for result code and minor changes to related responses * Update corresponding unit tests * Add other successful result codes Co-authored-by: Dmitriy Boltovskiy <dboltovskyi@luxoft.com>
| * Fix avoid race conditions (#3471)Serhii Niukalov (GitHub)2020-08-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduced enums instead multiple bool flags Update threadFunc logic Update Start logic Update Stop logic Update Join logic * Update of the affected code * UTs update Co-authored-by: sniukalov <sniukaov@luxoft.com>
| * [SDL 0273] WebEngine Projection mode (#3457)Alexander Kutsan (GitHub)2020-08-213-39/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Temporary commit. Changes rpc_spec submodule reference. NOTE: should be removed before merge * Update Mobile API for the new App HMI type WEB_VIEW * Update HMI API for the new App HMI type WEB_VIEW * Add app registration support of the hmi type WEB_VIEW * Update Unit tests related to app registration Add the new one case to check app registration with AppHMItype WEB_VIEW Update existing Application Manager UTs with the new methods for WEB_VIEW Update Application Mock * Add Unit tests for RAI request test * Implement HMI states management for WEP apps * Add new application exit reason RESOURCE_CONSTRAINT Add RESOURCE_CONSTRAINT to HMI API and its processing to OnExitApplicationNotification, update unit tests * Add web socket connection closing on RESOURCE_CONSTRAINT * Update ProtocolHandlerImpl::OnTMMessageSendFailed * Add Unit test for OnAppInterfaceUnregistedNotification * Remove redundant code * Add WEP media & nonmedia to general test cases * Move function to iface class to allow its testing * Add WEP media/nonmedia apps registration for HMI state checks Added unit test cases for WEP media and non-media applications, which allow to check HMI Level, system context, audio and video streaming states calculation after the following actions: - Initial HMI state after registration - HMI state after app activaion - HMI State after app deactivation - HMI state after app exit Note: HMI state includes HMI level, audio, video streaming state, system context * Make code more clear & easy for debug * Add test case for WEP app in resuming mode * Add missed logging * Close connection after RESOURCE_CONSTRAINT RESOURCE_CONSTRAINT unregister reason will close connection for all applications, but not only Web engine projection * Refactoring no functional changes Use setters instead of direct access to app_hmi_type bool var * Use PolicyHandler::CheckHMIType to avoid code duplication * Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc Co-authored-by: JackLivio <jack@livio.io> * Use log to check if web engine is allowed * fixup! Use log to check if web engine is allowed * Revert "fixup! Use log to check if web engine is allowed" This reverts commit baad4aae5ffdeba5502a533b2eeb18de84d92b05. * Revert "Use log to check if web engine is allowed" This reverts commit 94c6a7d9efc6912777834bb5aca22c7b46d43497. * Revert "Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc" This reverts commit 3296fcc399588f01624c1a27f64ab8bc9176e197. * Revert "Use PolicyHandler::CheckHMIType to avoid code duplication" This reverts commit 2c695099a63b838915cb9b5c91c46ad7fc013b47. * Use log string to check if WEB engine is not allowed * Update submodules Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: sniukalov <sniukaov@luxoft.com> Co-authored-by: Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com> Co-authored-by: Mykhailo Vorobiov (GitHub) <61186891+mvorobio@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: JackLivio <jack@livio.io> Co-authored-by: YarikMamykin <ymamykin@gmail.com> Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
| * Cache Driver Distraction Capabilityfix/driver_distraction_capability_cachingjacobkeeler2020-08-191-0/+10
| |
* | Updates, related to HMI CapabilitiesYana Chernysheva2020-08-181-8/+5
| |
* | Remove deprecated methodsYana Chernysheva2020-08-181-112/+4
| |
* | Resolve conflictsYana Chernysheva2020-08-1811-318/+1340
|\ \ | |/
| * Add SubtleAlert RPC (#3459)Jacob Keeler2020-08-174-4/+20
| | | | | | | | | | | | | | * Add SubtleAlert RPC to project * Add OnSubtleAlertPressed implementation * Add `subtle_notifications_per_minute_by_priority` field to policies
| * Feature/Supported Character Sets (#3454)Shobhit Adlakha2020-08-171-0/+6
| | | | | | | | | | | | | | | | | | * Implement API changes * Change default character set in hmi capabilities to UTF_8 * Remove deprecated CharacterSet descriptions from API * Update rpc_spec submodule commit
| * Feature/Removing url parameter max length (#3259)Serhii Niukalov (GitHub)2020-08-101-32/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add unit tests to cover a test case * Removing maxlength attribute for OnSystemRequest,StartStream and StartAudioStream Sometimes, it is necessary to provide a URL which is very large and thus cannot fit in the current 1,000 or 500 character limit. * Update path length for video and audio streaming files * fixup! Update path length for video and audio streaming files * fixup! Add unit tests to cover a test case * fixup! Add unit tests to cover a test case * fixup! Removing maxlength attribute for OnSystemRequest,StartStream and StartAudioStream Co-authored-by: sniukalov <sniukaov@luxoft.com> Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com>
| * SDL Core implementation of feature [0257] New vehicle data HandsOffSteering ↵Yana Chernysheva (GitHub)2020-08-102-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#3394) * Add changes to HMI_API * Add changes related to MessageHelper * Add the new parameter into the sdl_preloaded_pt and policy_table_interface_ext files The new parameter "handsOffSteering" was added into the "DrivingCharacteristics-3" section of the sdl_preloaded_pt file. Also the new parameter was added into the policy_table_interface_ext file * Update the sdl_preloaded_pt.json file with the new schema item Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: YarikMamykin <ymamykin@gmail.com> Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
| * SDL Core implementation of feature - 0261 New vehicle data WindowStatus (#3391)Yaroslav Mamykin (GitHub)2020-08-072-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add window status related data types to HMI API * Update rpc_spec url to fork * Update MOBILE API in rpc_spec with WindowStatus data * Update SDL core with WindowState related data * Add/Update unit tests * Update preloaded json file * Add window status section to sdl_preloaded_pt.json * fixup! Update MOBILE API in rpc_spec with WindowStatus data * fixup! Add window status section to sdl_preloaded_pt.json * fixup! Add/Update unit tests * Update src/appMain/sdl_preloaded_pt.json Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * Update src/appMain/sdl_preloaded_pt.json Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * Update submodules Co-authored-by: YarikMamykin <ymamykin@gmail.com> Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com> Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
| * Additional Submenus and Driver Distraction Limits (#3447)JackLivio2020-08-074-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement additional sub menus * Fix merge conflicts * Revert adding mobile api merge conflict * Update src/components/interfaces/HMI_API.xml Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update src/components/application_manager/src/application_data_impl.cc Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Address comments * Fix unit tests * Fix conflitcs * Update src/components/interfaces/HMI_API.xml Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update commit hash Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com>
| * SDL Core implementation of feature - 0266 New vehicle data gearStatus (#3401)Mykola Korniichuk (GitHub)2020-08-062-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New vehicle data: GearStatus * Add the new parameter into the rpc_spec * Add the new parameter into the sdl_preloaded_pt and policy_table_interface_ext files * Update the sdl_preloaded_pr.json file with the new schema item These changes are not as necessary, but to keep project in consistent state, they were added. * TMP: Update rpc_spec This commit should be removed before merge * fixup! Add the new parameter into the rpc_spec * Update prndl parameter description * fixup! Update the sdl_preloaded_pr.json file with the new schema item * fixup! Update the sdl_preloaded_pr.json file with the new schema item * Update src/appMain/sdl_preloaded_pt.json Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * Update submodules Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com> Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
| * [SDL 0253] Feature/New vehicle data StabilityControlsStatus (#3304)Serhii Niukalov (GitHub)2020-08-062-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change rpc_spec url to fork * Update Mobile API for the StabilityControlsStatus * Update HMI API for the StabilityControlsStatus Add StabilityControlsStatus for GetVehicleData, SubscribeVehicleData, UnsubscribeVehicleData & OnVehicleData RPCs * Add new vehicle data StabilityControlsStatus * Update the sdl_preloaded_pr.json file with the new schema item These changes are not as necessary, but to keep project in consistent state, they were added. * Add StabilityControlsStatus to json test files * fixup! Change rpc_spec url to fork * Temporary commit to rpc_spec Should be removed before merge * Update src/appMain/sdl_preloaded_pt.json Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * Update rpc_spec reference Co-authored-by: sniukalov <sniukaov@luxoft.com> Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: Yevhenii <ydementieiev@luxoft.com> Co-authored-by: Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
| * Merge pull request #3347 from ↵Jacob Keeler2020-07-292-10/+12
| |\ | | | | | | | | | | | | smartdevicelink/fix/fix_button_subscriptions_mutex_deadlock Fix mutex deadlock around app button subscriptions
| | * Fix mutex deadlock around app button subscriptionsfix/fix_button_subscriptions_mutex_deadlockAndrii Kalinich2020-06-232-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes there was observed mutex deadlock while more then one thread are accessing buttons subscriptions container protected with data accessor class. The issue is happening when one thread is trying to unregister application, acquires applications lock and trying to save application resumption data which at some point requires app subscribed buttons lock to be acquired. At the same moment another thread is trying to resume application data and acquires subscribed buttons accessor after which is trying to send notifications to HMI, which at some point requires applications lock to be acquired. When these two threads have a time intersection, mutex deadlock is happening. To resolve this deadlock, button subscription accessor has been replaced with temporary accessor + copying protected content to a local variable which allows to release that lock beforehand.
| * | [SDL 0249] Feature/persisting hmi capabilities (#3397)Yevhenii Dementieiev2020-07-176-265/+1213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace raw pointers with shared pointers * Save UI.GetCapabilities, UI.GetLanguage, UI.GetSupportedLanguages responses into the file specified by ini file If ini file contains an empty path to the cache file, this feature will be disabled and SDL will work as before. SDL will save each response only first time, after that file will not be overwritten. On master reset SDL will remove the cache file. SDL will read default hmi capability values from the cache file on each system boot up * Fix doxygen * Define HMI interfaces aliases * Implement caching for VR, TTS, Buttons, VehicheInfo and RC capabilities * Fix default capabilities structure according to the HMI API * Send requests to get capabilities from HMI in case any capability is missing in cache * Refactor RC capabilities storing and retrieving. Fix related UTs. * Created implementation and unit tests for HMI capabilities persistence after SW update * Created implementation for save and received MetaInfo * Increase unit tests coverage on persistence HMI capabilities * Do not rewrite MetaInfo in case invalid BC.GetSystemInfo response from HMI * Read pcm_stream_capabilities from HMI and save to the cache * Refactor hmi capabilities test * Fix wrong convert PrerecordedSpeech and added unit test for check * Suspend response to RAI requests until HMI has responded to all the HMI capabilities * Request appropriate capabilities if they are not present in the cache and the default capabilities as well * fixup! Send requests to get capabilities from HMI in case any capability is missing in cache * Remove hm_capabilities.json test file It should be removed because during UT building the real hmi_capabilities.json file is copying to the test directory * Re-factor HMICapabilitiesImpl and add the new one method Make changes in the next places: - GetRequestsRequiredForCapabilities method rename to IsRequestsRequiredForCapabilities and return value change to bool. This commit provides the next implementation: the method checks if specified request should be sent to the HMI; - in the save_hmi_capability_field_to_json method remove redundant section in the json node to save; - JsonCapabilitiesGetter: GetInterfaceJsonMember method rename to IsInterfaceJsonMemberExists. Return value change to bool; - Add the new one function GetInterfaceGetter: returns the JsonCapabilitiesGetter according to specified interface name; - Parsing the capabilities cache file wrapped to the try/catch construction; - Add AddRequiredRequestsForCapabilities method; - Remove MatchesCCPUVersion method as redundant; - Rework PrepareXXXJsonValueForSaving methods; - Add new Unit tests for HMICapabilitiesImpl; - Update existing Unit tests according to the appropriate changes; * Update CCPU Version max value parameter (regular and external policies) * Minor updates: - Remove input parameter for the GetSystemInfo method, move the OnSoftwareVersionReceived method out of GetSystemInfo method; - UIGetCapabilitiesResponse: retrieve reference for a specific section from a message instead of using the whole path to needed section; - OnTTSLanguageChangeNotification: add saving cached capabilities for VR; - OnVRLanguageChangeNotification: update log info; - VRGetCapabilitiesResponse: retrieve reference for a specific section from a message instead of using the whole path to needed section; - VRGetSupportedLanguagesResponse: update log info; - CacheManager (regular and external policies): add doxygen description for the SetPreloadedPtFlag method; move back meta info out of "for" loop; * Minor changes for the Unit tests * Fix SDL Core crash during getting RC capability There the case when RC capability didn't initialized yet and rc_capability() method is calling and returns invalid pointer to the RC capability. This commit provides the next changes: - Add check for returned pointer to rc_capability; - Add the new one capabilitiesStatus parameter "kInvalidStatus" for return value for the GetModuleDataCapabilities method; - Update capabilitiesStatus parameter names according to the coding style; * fixup! Re-factor HMICapabilitiesImpl and add the new one method * fixup! Re-factor HMICapabilitiesImpl and add the new one method * fixup! Re-factor HMICapabilitiesImpl and add the new one method * Remove "system_display_capabilities" smart key * Add to the RequestToHMI the RequestCapabilities method The "RequestCapabilities" methos is common for the all *IsReady requests. Because of that it was moved to the base class with common logic. * Re-factor all *IsReady request. The logic for getting capabilities from HMI is common for the all *IsReady request. This logic is implemented in the base RequestToHMI class. So, this logic should be removed from each request and the method of the base class should be used. * fixup! Re-factor all *IsReady request. Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com> Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: Yevhenii Dementieiev (GitHub) <ydementieiev@luxoft.com> Co-authored-by: sniukalov <sniukaov@luxoft.com>
| * | Fix/sdl 491 apt support formats (#2184)Sho Amano2020-06-301-1/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move definitions of SamplingRate / AudioCaptureQuality / AudioType to public header * Transfer AudioPassThru configuration to adapter * fix: apply AudioPassThru config to GStreamer pipeline * Update media manager test to remove deprecated method * Reflect code review comments - Update Doxygen comment format - Add description of create_caps_string() method * Fix style issue in from_mic_recorder_adapter.h * Update MediaManager to use Mobile API audio related enums Reflecting review comments.
* | Add template functions and delete or mark unused methods as deprecatedYana Chernysheva2020-06-194-95/+29
|/
* Fix potential deadlock in PolicyHandler (#3383)Alexander Kutsan (GitHub)2020-06-181-6/+10
| | | | | | | | | | | | | | | | | | | | | | | SYNC-10345 There was a vulnerability in the PolicyHandler which causes a mutex deadlock. For example - MessageLoop thread of RpcService handles incoming messages. In case when SDL receives AllowSDLFunctionality notification, this thread calls OnAllowSDLFunctionalityNotification inside PolicyHandler. At some point of time this function captures accessor from AM which holds applications_list_lock_ there. At this moment thread AM Pool 0 of RequestController processes some RPC from queue and captures policy_manager_lock_ in PolicyHandler. After that at some moment thread AM Pool 0 tries to get application shared pointer from AM and locks itself as this mutex are already locked with thread MessageLoop. Also, MessageLoop thread at some moment tries to acquire policy_manager_lock_ and locks itself as this mutex are already locked with thread AM Pool 0, which is waiting for applications_list_lock_ to unlock. As a result we have a classical thread deadlock after which SDL stuck forewer. To avoid such situations, there was analyzed all bottlenecks related to applications_list_lock_ and its accessors. Accessors were scoped in several places to avoid similar deadlocks in future. Co-authored-by: Elvis Kuliiev <ekuliiev@luxoft.com>
* Update to filter unknown enums (#3436)JackLivio2020-06-153-2/+22
| | | | | | | | | | | | | * Add HMI warnings response for filtered enums * Only filter enums with valid typing Invalid types with an enum schema item were being silently filtered, so we need to look for a specific result code from validate() instead of looking for a general failure. * Fix source for messages from hmis * Fix unit tests Co-authored-by: jacobkeeler <jacob.keeler@livioradio.com>
* clean up choice_set_map_ in DynamicApplicationDataImpl destructor (#3420)Collin2020-06-151-0/+5
|
* Filter unknown enums when removing unknown parameters (#3385)Jacob Keeler2020-06-104-14/+53
| | | | | | | | | * Add enum filtering step to applySchema This step is triggered when `remove_unknown_parameters` is enabled * Add unit tests * Pass warning info to message response after processing
* Sdl must store onWayPointChange internally (#2490)Pavel Zhdanov (GitHub)2020-06-081-0/+16
| | | | | | | | | | | | * Add saving way points during notification - When OnWayPointNotification appeared the wayPoint is saving - When new app subscribing on wayPointNotification stored way points are sending to app * Add unit tests * fix style, update to remove (uint32_t) overload of SubscribeAppForWayPoints Co-authored-by: collin <collin+i@collinmcqueen.com>
* trigger ptu on startup only in proprietary policy mode (#3415)Collin2020-06-051-1/+1
|
* fix: memory leak in DynamicApplicationDataImpl class (#2259)Sho Amano2020-06-031-0/+15
|
* Fix defect: revoked app still be resumed as FULL. (#2546)Igor Gapchuk (GitHub)2020-05-291-3/+7
| | | | | | App was resumed with Full HMI Level when it has been flagged as revoked in the policy table. This PR adds a check that app is not revoked to continue with HMI Level resumption.
* Fix onsystemrequest retry logic (#3400)JackLivio2020-05-282-4/+32
| | | | | | | | | * Fix onsystemrequest retry logic * Cache policy update file from HMI for retries * Fix issues with previous commit Co-authored-by: jacobkeeler <jacob.keeler@livioradio.com>
* unsubscripe app from waypoints when it is unregistered (#3373)Collin2020-05-211-19/+28
| | | | | | | * unsubscripe app from waypoints when it is unregistered * address review comments * fix style
* Fix/gufm check syntax (#3369)Collin2020-05-202-19/+19
| | | | | | | | | | | * Fix implementation for SDLGetUserFriendlyMessage * Unit test for SDLGetUserFriendlyMessage: checking syntax * Changes according to comments * add invalid syntax error response info Co-authored-by: ZhdanovP <pzhdanov@luxoft.com>
* Fix SendUpdateAppList and SendOnAppUnreg order (#2517)Kostiantyn Grygoriev2020-05-191-5/+7
| | | Co-authored-by: collin <collin@livio.io>
* Change reason to IGNITION_OFF only if reason wasn't defined before (#3274)Yana Chernysheva (GitHub)2020-05-181-2/+6
|