smartdevicelink / sdl_core

SmartDeviceLink In-Vehicle Software and Sample HMI
BSD 3-Clause "New" or "Revised" License
240 stars 245 forks source link

Set Last PTU App ID when forwarding on system request in HTTP policy mode #3863

Closed iCollin closed 2 years ago

iCollin commented 2 years ago

Fixes https://github.com/smartdevicelink/sdl_core/issues/3862

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

ATF

Summary

The last_ptu_appid is only updated in PROPRIETARY mode at the beginning of the OnSystemRequest Run: https://github.com/smartdevicelink/sdl_core/blob/b74c738101f282143094394454d20d12aa8e0d05/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc#L81

Because of this UpdateLastPTUApp should be called in every policy mode besides proprietary.

CLA

ShobhitAd commented 2 years ago

An #ifndef PROPRIETARY_MODE check should also be added to mock_policy_handler_interface.h#L203 for the UpdateLastPTUApp mock method. At the moment compilation fails for HTTP mode with build tests on

#endif
#ifndef PROPRIETARY_MODE
  MOCK_METHOD1(UpdateLastPTUApp, void(const uint32_t app_id));
#endif