summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix logic in recent changesfeature/subtle_alert_stylejacobkeeler2020-08-071-1/+1
|
* Address commentsjacobkeeler2020-08-0713-31/+44
|
* Update RPC Spec submodulejacobkeeler2020-07-301-0/+0
|
* Merge branch 'develop' into feature/subtle_alert_styleJacob Keeler2020-07-30162-2930/+6679
|\
| * 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.
| * | allow button events to be forwarded to apps in LIMITED (#3461)Collin2020-07-233-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-17157-2912/+6657
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | | Add `subtle_notifications_per_minute_by_priority` field to policiesjacobkeeler2020-07-2349-86/+582
| | |
* | | Add OnSubtleAlertPressed implementationjacobkeeler2020-07-207-0/+320
| | |
* | | Add OnSubtleAlertPressed to policiesjacobkeeler2020-07-172-1/+8
| | | | | | | | | | | | also update HMI API description
* | | Apply HMI API revisionjacobkeeler2020-07-161-1/+1
| | |
* | | Add fixes after testingjacobkeeler2020-07-163-11/+42
| | |
* | | Merge remote-tracking branch 'origin/develop' into feature/subtle_alert_stylejacobkeeler2020-07-152-31/+37
|\ \ \ | |/ /
| * | SDLCORE-459:Make refactoring in mb_controller.cc (#3381)Alexander Kutsan (GitHub)2020-07-132-31/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDLCORE-459 Fix race condition ragarding Helgrind issue. Error 9 : Possible race condition in case of using assignment operator with atomic variable 'shutdown_', fix via using 'atomic_exchange'. Error 10: Incorrect sequence of closing boost asio objects. Add member function into CMessageBrokerController for correct close sequence. Co-authored-by: Maksym Shvaiko <MShvaiko@luxoft.com>
* | | Add SubtleAlert RPC to projectjacobkeeler2020-07-0820-15/+1115
|/ /
* | Feature/aligning hmi mobile api for pcm stream capabilities (#3297)Igor Gapchuk (GitHub)2020-07-073-0/+24
| | | | | | | | | | | | | | | | | | * 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-3012-41/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* add DEPRECATED notice to OnFindApplications (#3451)Collin2020-06-231-0/+1
|
* Fixes race condition in messagemeter.h (#3377)Alexander Kutsan (GitHub)2020-06-221-1/+24
| | | | | | | | | | SDLCORE-373 Unprotected critical section accessed by two different threads, timing_map was being modified by clearing the map identifiers causing a crash in boost::date_time Review: Change RWLock to Lock, Added FrequencyImpl private method Co-authored-by: Mario Godinez <mgodine6@ford.com>
* Add Destructor to BluetoothTransportAdapter (#3442)Collin2020-06-192-7/+0
| | | prevent override of bluetooth destructor so that the default transport adapter destructor impl will be called
* 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 Handshake Flow issues (#3441)Jacob Keeler2020-06-184-27/+30
| | | | | | | | | * Fix issue with External PTU timeout When attempting to start an encrypted service, the mobile proxy would not receive a response if the PTU timed out. This is because the retry count is based on the number of OnSystemRequests received from the HMI. Since that number would never exceed the number of retries, `IsAllowedRetryCountExceeded` would never return false. This will now return false after the final retry times out. * Add error code check in ProcessInternalError If the proxy responds with NOT_SUPPORTED or SSL_INVALID_DATA, Core will mark the handshake as failed.
* Revert "remove hci_inquiry call"collin2020-06-171-0/+31
| | | | This reverts commit 1e5d115dd5c12b15c5667961c24737f08691b988.
* remove hci_inquiry callcollin2020-06-171-31/+0
|
* Fix deadlock in timer.cc (#3379)fix/sdl_build_problemsAlexander Kutsan2020-06-161-1/+0
| | | | | | | | | SDLCORE-458 Fix deadlock in timer.cc call lock two times for Lock, second lock was removed, cause using of it hadn't any benefits. Regarding of Helgrind report. Co-authored-by: Maksym Shvaiko <MShvaiko@luxoft.com>
* only set language in rai response if it is valid (#3435)Collin2020-06-151-4/+12
|
* Update to filter unknown enums (#3436)JackLivio2020-06-158-27/+59
| | | | | | | | | | | | | * 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-1038-138/+696
| | | | | | | | | * 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 style (#3432)Jacob Keeler2020-06-101-2/+1
|
* Merge pull request #3417 from smartdevicelink/feature/daemon_scriptJacob Keeler2020-06-097-30/+187
|\ | | | | Add SDL Core Daemon Script
| * Fix usage logJacob Keeler2020-06-091-1/+1
| |
| * Remove debug logJacob Keeler2020-06-091-1/+0
| |
| * Add daemon.sh to unify scripts for external and regularfeature/daemon_scriptjacobkeeler2020-06-084-196/+155
| |
| * Fix missing -H flag in policy server dependency stepJacob Keeler2020-06-081-1/+1
| |
| * Add start.sh which uses the new core.shjacobkeeler2020-06-082-0/+22
| |
| * Address commentsjacobkeeler2020-06-082-43/+43
| |
| * Fix broken return code in core_stopjacobkeeler2020-06-022-2/+2
| |
| * Add features to make the daemon script more reliablejacobkeeler2020-06-023-32/+154
| | | | | | | | | | | | | | Create dedicated PID file directory Check running processes before starting or stopping Core Add `kill` command to destroy all running instances of Core Change main SDL thread to be identifiable by name
| * First version of daemon script from proposaljacobkeeler2020-05-215-30/+85
| |
* | 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-088-11/+93
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Bugfix/protocol handler memory issues (#2270)Sho Amano2020-06-064-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: memory leak in ProtocolHandlerImpl::NotifySessionStarted() This is detected by valgrind. * fix: buffer over-run in ProtocolPayloadTest This is an issue of unit test implementation and only affects unit testing. * fix: invalid memory accesses in ProtocolHandlerImplTest These affect unit testing only. Invalid memory accesses occurred because the mock class didn't configure protocol version field properly. * fix: valgrind warning in IncomingDataHandlerTest This is not actually an issue. valgrind reported a warning since the memory area was not initialized. Co-authored-by: Collin <iCollin@users.noreply.github.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>
* | Remove defunct `appID` parameter from UnsubscribeVehicleData (#2331)Jacob Keeler2020-06-051-3/+0
| |
* | trigger ptu on startup only in proprietary policy mode (#3415)Collin2020-06-051-1/+1
| |
* | Fix: handle network interface removal (#2759)Sho Amano2020-06-045-101/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: IP address isn't notified when network interface is removed When RTM_DELLINK is notified, corresponding network interface has been already destroyed so if_indextoname() won't return a valid name. To handle such case, status_table_ is updated to use network interface index as key. * fix: generate DeviceDisconnected event when network interface is removed * fix a few comments * Reflect review comments - Add const where applicable - Add more descriptions * Reflect code review Replace FindInterfaceStatus() with std::find_if() call. * Reflect code review Remove unnecessary include. * fix style issue