summaryrefslogtreecommitdiff
path: root/src/components/application_manager
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/develop' into feature/additional_submenusJackLivio2020-07-23124-2127/+5746
|\ | | | | | | | | | | | | | | | | # Conflicts: # src/appMain/hmi_capabilities.json # src/components/application_manager/include/application_manager/hmi_capabilities_impl.h # src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc # src/components/application_manager/src/hmi_capabilities_impl.cc # src/components/include/application_manager/hmi_capabilities.h
| * allow button events to be forwarded to apps in LIMITED (#3461)Collin2020-07-232-4/+8
| | | | | | | | | | | | | | | | | | * allow button events to be forwarded to subscribed mobile apps in hmi level LIMITED for all buttons besides OK * fixup! allow button events to be forwarded to subscribed mobile apps in hmi level LIMITED for all buttons besides OK use existing var and clean up condition * fix description of OnButtonPress and OnButtonEvent param appID
| * [SDL 0249] Feature/persisting hmi capabilities (#3397)Yevhenii Dementieiev2020-07-17121-2134/+5640
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Feature/aligning hmi mobile api for pcm stream capabilities (#3297)Igor Gapchuk (GitHub)2020-07-072-0/+23
| | | | | | | | | | | | | | | | | | * Adding pcmStreamCapabilities param to HMI API in UI.GetCapabilities * Adding to read pcmStreamCapabilities from HMI * Add unit test to cover a test case Co-authored-by: sniukalov <sniukaov@luxoft.com>
| * Fix 3119 bug:App gets REJECTED instead of UNSUPPORTED_RESOURCE to ↵Jim-Nexty2020-06-301-1/+1
| | | | | | | | | | ChangeRegistration with not supported language (#3427) Co-authored-by: zhangwenqin <zhangwenqin@iauto.com>
| * Fix/sdl 491 apt support formats (#2184)Sho Amano2020-06-302-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 check for already existed subscriptions during resumption in ↵Yana Chernysheva (GitHub)2020-06-251-9/+31
| | | | | | | | | | VehicleInfoPlugin (#3355) * Add check for already existed subscriptions
| * 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>
* | Fix unit testsJackLivio2020-07-221-0/+18
| |
* | Address commentsJackLivio2020-07-1512-23/+80
| |
* | Update ↵JackLivio2020-07-141-1/+1
| | | | | | | | | | 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.ccJackLivio2020-07-141-1/+1
| | | | | | Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com>
* | Update ↵JackLivio2020-07-141-2/+3
| | | | | | | | | | 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>
* | Fix merge conflictsJackLivio2020-06-187-37/+10
| |
* | Merge remote-tracking branch 'origin/develop' into feature/additional_submenusJackLivio2020-06-17464-6520/+32278
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/components/application_manager/include/application_manager/hmi_capabilities_impl.h # src/components/application_manager/include/application_manager/smart_object_keys.h # src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc # src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc # src/components/application_manager/src/hmi_capabilities_impl.cc # src/components/application_manager/test/include/application_manager/mock_hmi_capabilities.h # src/components/include/application_manager/hmi_capabilities.h # src/components/interfaces/HMI_API.xml # src/components/interfaces/MOBILE_API.xml
| * only set language in rai response if it is valid (#3435)Collin2020-06-151-4/+12
| |
| * Update to filter unknown enums (#3436)JackLivio2020-06-154-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1012-25/+92
| | | | | | | | | | | | | | | | | | * 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
| * fix build error in http unit tests (#3422)Collin2020-06-091-1/+3
| | | | | | | | | | * fix build error in http unit tests * fix style
| * Sdl must store onWayPointChange internally (#2490)Pavel Zhdanov (GitHub)2020-06-084-7/+81
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * fix: memory leaks in data_resumption_test (#2273)Sho Amano2020-06-062-1/+37
| | | | | | | | | | This issue only affects unit testing. Co-authored-by: Collin <iCollin@users.noreply.github.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-294-8/+51
| | | | | | | | | | | | 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-288-9/+74
| | | | | | | | | | | | | | | | | | * 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-212-19/+48
| | | | | | | | | | | | | | * unsubscripe app from waypoints when it is unregistered * address review comments * fix style
| * Forward OnButtonPressNotifications where HMI specifies appID to apps in ↵Collin2020-05-202-3/+5
| | | | | | | | | | | | | | | | | | LIMITED HMI Level (#3378) * initialize app in non custom button path of on_button_press run * fixup! initialize app in non custom button path of on_button_press run fix unit tests with changes in run
| * Fix/gufm check syntax (#3369)Collin2020-05-206-28/+72
| | | | | | | | | | | | | | | | | | | | | | * 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>
| * Add RPCService unit tests (#3250)Yana Chernysheva (GitHub)2020-05-184-0/+900
| | | | | | | | | | | | | | | | | | | | | | * Add RPCService unit tests * Add prerequisites for execution of unit tests * Rearrange and delete unused includes * Add minor changes Co-authored-by: JackLivio <jack@livio.io>
| * Change reason to IGNITION_OFF only if reason wasn't defined before (#3274)Yana Chernysheva (GitHub)2020-05-181-2/+6
| |
| * Fix/issue 1951 (#3371)Collin2020-05-182-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove deadlock danger when removing Connections from a ConnectionMap * fix style, use log debug instead of trace for singular messages * Revert "fix style, use log debug instead of trace for singular messages" This reverts commit c83288ec9fc9007e48044b09ad038edbf612e038. * fix style, use log debug instead of trace for singular messages * restore condition updates lost with merge of old versions Co-authored-by: Frank <fronneburg@xevo.com>
| * Fix/Add Startup PTU trigger check (#3363)Shobhit Adlakha2020-05-183-0/+10
| | | | | | | | | | | | | | * Add Startup PTU check * Reset Stop PTU etry when first app is registered * Address review comment
| * Merge pull request #2553 from smartdevicelink/fix/start_stream_retry_countJacob Keeler2020-05-182-8/+8
| |\ | | | | | | Fix Start Stream retry count
| | * Fix Start Stream retry countfix/start_stream_retry_countjacobkeeler2018-08-292-8/+8
| | |
| * | ResetGlobalProperties doesn't reset HELPPROMPT and VRHELPITEMS to default ↵Collin2020-05-183-8/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values (#3357) * Fix bug `ResetGlobalProperties` (#2337) Fix bug `ResetGlobalProperties` does't reset `HELPPROMPT` and `VRHELPITEMS` to default values Fix UT's after bugfixing - Fix `ResetGlobalPropertiesRequestTest` - Add mock function into `MockApplicationManagerSettings` Github issue #1306 Co-authored-by: v-malko4 <vmalkov@luxoft.com> * fix vr_help_title SO type, rename help_prompt_ in unit tests to so_help_prompt * fix style Co-authored-by: v-malko4 <vmalkov@luxoft.com>
| * | only return if we are sure we are out of space (#3361)Collin2020-05-131-5/+0
| | |
| * | Revert "RAI reply DUPLICATE_NAME when app has same id and name as existing app"collin2020-05-133-69/+8
| | | | | | | | | | | | This reverts commit 236bdbaa283147044a6144f8c96cc43b82ff1014.
| * | RAI reply DUPLICATE_NAME when app has same id and name as existing appcollin2020-05-133-8/+69
| | |
| * | [SDL4.0]SDL does not create icons folder in case it was removed (#2649) (#3359)Collin2020-05-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | The check for existence directory of app icons folder has been added to SetAppIconRequest. Co-authored-by: ValeriiMalkov <vmalkov@luxoft.com> Co-authored-by: ValeriiMalkov <vmalkov@luxoft.com>
| * | SDL crash during cleanup. (#2621)Mykola Korniichuk (GitHub)2020-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SDL crash during StopComponents() if StartComponents() failed. If resumption_storage_ in ResumeCtrlImpl is failed to initialize, SDL will try to stop components and exit with error code. At this time application manager tries to unregister all applications and call ResumeCtrlImpl::OnIgnitionOff() where resumption_storage_ is used. As a result, a crash will occur. As an example, if AppStorageFolder have no read/write access, resumption_storage_ fails to initialize. Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com>
| * | do not retry ptu if no apps are connected (#3350)Collin2020-04-301-0/+4
| | | | | | | | | | | | | | | * do not retry ptu if no apps are connected * no URL should be returned if there is no app to do PTU
| * | Add permission checking for all messages to and from mobile (#3344)6.1.0_RC2Jacob Keeler2020-04-2712-107/+152
| | | | | | | | | * Add permission checking for all messages to and from mobile
| * | Fix capability window update when window_id is missing (#3342)JackLivio2020-04-221-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix capability window update when window_id is missing * Refactor comments * Update src/components/application_manager/src/application_data_impl.cc Co-Authored-By: Collin <iCollin@users.noreply.github.com> Co-authored-by: Collin <iCollin@users.noreply.github.com>
| * | Fix result code generic error while subscribing to vehicle data (#3264)Yana Chernysheva (GitHub)2020-04-222-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix iteration on set with possible erase * Add and process set with skiped result codes * fixup! Add and process set with skiped result codes * fixup! Add and process set with skiped result codes
| * | Merge pull request #3341 from smartdevicelink/fix/external_policy_buildJacob Keeler2020-04-214-74/+39
| |\ \ | | | | | | | | Move cached app logic to ChoosePTUApplication
| | * | Move cached app logic to ChoosePTUApplicationfix/external_policy_buildjacobkeeler2020-04-214-74/+39
| | | | | | | | | | | | | | | | Also add macro guards for uses of last_ptu_app_id_
| * | | Fix UpdateAppList/UpdateDeviceList spam (#3339)Andrii Kalinich (GitHub)2020-04-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix UpdateAppList/UpdateDeviceList spam There was noticed a continuous spam of update app and device list requests from SDL to HMI even if thre is no any devices connected and apps registered. After analysis, there was found a couple of places where logic should be updated: - In OnHMIStartedCooperation don't send update app list after refreshing cloud app information as this function able to trigger the same request itself when needed - When update app list timer is expired, don't send update app list if no any apps were registered or unregistered while timer was running - In transport manager, don't raise OnDeviceListUpdated event if no any devices were added/removed - When WebEngine device is created, it makes sense to connect it automatically and set its status to CONNECTED as its internal communication between SDL and HMI - In transport adapter, don't notify listeners via OnConnectionStatusUpdated() callbacks if device connection status was not actually changed All these actions together prevents all possible reasons of UpdateAppList/UpdateDeviceList spam observed before fix. * fixup! Fix UpdateAppList/UpdateDeviceList spam * fixup! fixup! Fix UpdateAppList/UpdateDeviceList spam * fixup! fixup! fixup! Fix UpdateAppList/UpdateDeviceList spam
| * | | StartEndStreamTimer in StopNaviService (#3325)Collin2020-04-211-1/+1
| |/ /