Skip to content

Commit

Permalink
Merge branch 'sprint/24Q2' into sprint/24Q2
Browse files Browse the repository at this point in the history
  • Loading branch information
karuna2git authored Apr 4, 2024
2 parents 2008bb3 + f67b2af commit b19f013
Show file tree
Hide file tree
Showing 51 changed files with 3,132 additions and 1,193 deletions.
8 changes: 8 additions & 0 deletions DisplaySettings/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ bool isStbHDRcapabilitiesCache = false;
static int hdmiArcPortId = -1;
static int retryPowerRequestCount = 0;
static int hdmiArcVolumeLevel = 0;
bool audioPortInitActive = false;
std::vector<int> sad_list;
#ifdef USE_IARM
namespace
Expand Down Expand Up @@ -572,6 +573,11 @@ namespace WPEFramework {
{
if (m_sendMsgThread.joinable())
m_sendMsgThread.join();
int count = 0;
while(audioPortInitActive && count < 20){
sleep(100);
count++;
}
}
catch(const std::system_error& e)
{
Expand Down Expand Up @@ -4706,7 +4712,9 @@ namespace WPEFramework {

void DisplaySettings::initAudioPortsWorker(void)
{
audioPortInitActive = true;
DisplaySettings::_instance->InitAudioPorts();
audioPortInitActive = false;
}

void DisplaySettings::powerEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
Expand Down
4 changes: 4 additions & 0 deletions MaintenanceManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.28] - 2024-03-20
### Fixed
- Fixed Activation Logic for Maintenance Manager WAI

## [1.0.27] - 2024-01-16
### Fixed
- Fixed Network Retry logic in Maintenance Manager in isDeviceOnline()
Expand Down
5 changes: 2 additions & 3 deletions MaintenanceManager/MaintenanceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ namespace WPEFramework {
}

/* Controlled by CFLAGS */
#if defined(SUPPRESS_MAINTENANCE)
#if defined(SUPPRESS_MAINTENANCE) && !defined(ENABLE_WHOAMI)
bool activationStatus=false;
bool skipFirmwareCheck=false;

Expand All @@ -319,7 +319,7 @@ namespace WPEFramework {
#endif

#if defined(ENABLE_WHOAMI)
string activation_status = "";
string activation_status = checkActivatedStatus();
if (UNSOLICITED_MAINTENANCE == g_maintenance_type) {
/* WhoAmI check*/
bool whoAmIStatus = knowWhoAmI(activation_status);
Expand Down Expand Up @@ -480,7 +480,6 @@ namespace WPEFramework {

retryCount++;
if (retryCount == 4 && !success) {
activation_status = checkActivatedStatus();
if (activation_status == "activated") {
LOGINFO("Device is already activated. Exiting from knowWhoAmI()");
success = true;
Expand Down
27 changes: 16 additions & 11 deletions Miracast/MiracastService/MiracastController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ void MiracastController::Controller_Thread(void *args)
CONTROLLER_MSGQ_STRUCT controller_msgq_data = {0};
bool new_thunder_req_client_connection_sent = false,
another_thunder_req_client_connection_sent = false,
start_discovering_enabled = false,
session_restart_required = false,
p2p_group_instance_alive = false;

Expand Down Expand Up @@ -1067,7 +1066,7 @@ void MiracastController::Controller_Thread(void *args)
m_notify_handler->onMiracastServiceClientConnectionError( mac_address , device_name , error_code );
}
MIRACASTLOG_INFO("!!! Restarting Session !!!");
restart_session(start_discovering_enabled);
restart_session(m_start_discovering_enabled);
session_restart_required = false;
}
}
Expand Down Expand Up @@ -1140,14 +1139,14 @@ void MiracastController::Controller_Thread(void *args)
MIRACASTLOG_INFO("CONTROLLER_START_DISCOVERING Received\n");
set_WFDParameters();
discover_devices();
start_discovering_enabled = true;
m_start_discovering_enabled = true;
}
break;
case CONTROLLER_STOP_DISCOVERING:
{
MIRACASTLOG_INFO("CONTROLLER_STOP_DISCOVERING Received\n");
stop_session(true);
start_discovering_enabled = false;
m_start_discovering_enabled = false;
}
break;
case CONTROLLER_RESTART_DISCOVERING:
Expand All @@ -1163,7 +1162,7 @@ void MiracastController::Controller_Thread(void *args)
reset_NewSourceName();
MIRACASTLOG_INFO("[%s] Cached Device info removed...",cached_mac_address.c_str());
}
restart_session(start_discovering_enabled);
restart_session(m_start_discovering_enabled);
new_thunder_req_client_connection_sent = false;
another_thunder_req_client_connection_sent = false;
session_restart_required = true;
Expand Down Expand Up @@ -1244,7 +1243,7 @@ void MiracastController::Controller_Thread(void *args)
{
MIRACASTLOG_INFO("TEARDOWN request sent to RTSP handler\n");
//stop_streaming(CONTROLLER_TEARDOWN_REQ_FROM_THUNDER);
restart_session(start_discovering_enabled);
restart_session(m_start_discovering_enabled);
}
break;
default:
Expand Down Expand Up @@ -1557,16 +1556,22 @@ void MiracastController::send_thundermsg_to_controller_thread(MIRACAST_SERVICE_S

void MiracastController::set_enable(bool is_enabled)
{
MIRACAST_SERVICE_STATES state = MIRACAST_SERVICE_WFD_STOP;

MIRACASTLOG_TRACE("Entering...");

if ( true == is_enabled)
{
state = MIRACAST_SERVICE_WFD_START;
MIRACASTLOG_INFO("MIRACAST_SERVICE_WFD_START Received");
set_WFDParameters();
discover_devices();
m_start_discovering_enabled = true;
}

send_thundermsg_to_controller_thread(state);
else
{
MIRACASTLOG_INFO("MIRACAST_SERVICE_WFD_STOP Received");
stop_session(true);
m_start_discovering_enabled = false;
}
//send_thundermsg_to_controller_thread(state);
MIRACASTLOG_TRACE("Exiting...");
}

Expand Down
6 changes: 4 additions & 2 deletions Miracast/P2P/MiracastP2P.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void MiracastP2P::reset_WFDParameters(void)
MiracastError MiracastP2P::discover_devices(void)
{
MiracastError ret = MIRACAST_FAIL;
std::string command, retBuffer,opt_flag_buffer;
std::string command, retBuffer;
MIRACASTLOG_TRACE("Entering..");

/*Start Passive Scanning*/
Expand All @@ -479,12 +479,14 @@ MiracastError MiracastP2P::stop_discover_devices(void)
MIRACASTLOG_TRACE("Entering...");

/*Stop Passive Scanning*/
command = "P2P_EXT_LISTEN 0 0";
command = "P2P_STOP_FIND";

ret = executeCommand(command, NON_GLOBAL_INTERFACE, retBuffer);
if (ret != MIRACAST_OK)
{
MIRACASTLOG_ERROR("Failed to Stop discovering devices");
}

MIRACASTLOG_TRACE("Exiting...");
return ret;
}
Expand Down
1 change: 1 addition & 0 deletions Miracast/include/MiracastController.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class MiracastController
GroupInfo *m_groupInfo;
bool m_connectionStatus;
bool m_p2p_backend_discovery{false};
bool m_start_discovering_enabled{false};
std::string m_current_device_name;
std::string m_current_device_mac_addr;

Expand Down
5 changes: 5 additions & 0 deletions PersistentStore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.9] - 2024-04-01
### Added
- Get token from auth service, supply ids in the cloud calls
- Return ERROR_NOT_SUPPORTED if unsupported

## [1.0.8] - 2024-03-21
### Added
- Account scope implementation
Expand Down
3 changes: 0 additions & 3 deletions PersistentStore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ install(TARGETS ${MODULE_NAME}
set(PLUGIN_IMPLEMENTATION ${MODULE_NAME}Implementation)
add_library(${PLUGIN_IMPLEMENTATION} SHARED
sqlite/Store2.cpp
sqlite/StoreCache.cpp
sqlite/StoreInspector.cpp
sqlite/StoreLimit.cpp
grpc/Store2.cpp
Module.cpp
)
Expand Down
1 change: 0 additions & 1 deletion PersistentStore/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#define MAXSIZE_ENV "PERSISTENTSTORE_MAXSIZE"
#define MAXVALUE_ENV "PERSISTENTSTORE_MAXVALUE"
#define LIMIT_ENV "PERSISTENTSTORE_LIMIT"
#define TOKEN_COMMAND_ENV "PERSISTENTSTORE_TOKEN_COMMAND"
#define IARM_INIT_NAME "Thunder_Plugins"
#define URI_RFC "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.PersistentStore.Uri"

Expand Down
1 change: 0 additions & 1 deletion PersistentStore/PersistentStore.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ configuration.add("key", "@PLUGIN_PERSISTENTSTORE_KEY@")
configuration.add("maxsize", "@PLUGIN_PERSISTENTSTORE_MAXSIZE@")
configuration.add("maxvalue", "@PLUGIN_PERSISTENTSTORE_MAXVALUE@")
configuration.add("limit", "@PLUGIN_PERSISTENTSTORE_LIMIT@")
configuration.add("tokencommand", "@PLUGIN_PERSISTENTSTORE_TOKEN_COMMAND@")
1 change: 0 additions & 1 deletion PersistentStore/PersistentStore.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ map()
kv(maxsize ${PLUGIN_PERSISTENTSTORE_MAXSIZE})
kv(maxvalue ${PLUGIN_PERSISTENTSTORE_MAXVALUE})
kv(limit ${PLUGIN_PERSISTENTSTORE_LIMIT})
kv(tokencommand ${PLUGIN_PERSISTENTSTORE_TOKEN_COMMAND})
end()
ans(configuration)
67 changes: 30 additions & 37 deletions PersistentStore/PersistentStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 0
#define API_VERSION_NUMBER_PATCH 8
#define API_VERSION_NUMBER_PATCH 9

namespace WPEFramework {

Expand Down Expand Up @@ -90,57 +90,50 @@ namespace Plugin {
Core::SystemInfo::SetEnvironment(MAXSIZE_ENV, std::to_string(_config.MaxSize.Value()));
Core::SystemInfo::SetEnvironment(MAXVALUE_ENV, std::to_string(_config.MaxValue.Value()));
Core::SystemInfo::SetEnvironment(LIMIT_ENV, std::to_string(_config.Limit.Value()));
Core::SystemInfo::SetEnvironment(TOKEN_COMMAND_ENV, _config.TokenCommand.Value());

uint32_t connectionId;

Store2::ScopeMapType initList1;
auto deviceStore2 = service->Root<Exchange::IStore2>(connectionId, 2000, _T("SqliteStore2"));
if (deviceStore2 != nullptr) {
initList1.emplace(Exchange::IStore2::ScopeType::DEVICE, deviceStore2);
_deviceStore2 = service->Root<Exchange::IStore2>(connectionId, 2000, _T("SqliteStore2"));
if (_deviceStore2 != nullptr) {
_deviceStore2->Register(&_store2Sink);
_deviceStore2->Register(_store);
_deviceStoreCache = _deviceStore2->QueryInterface<Exchange::IStoreCache>();
_deviceStoreInspector = _deviceStore2->QueryInterface<Exchange::IStoreInspector>();
_deviceStoreLimit = _deviceStore2->QueryInterface<Exchange::IStoreLimit>();
}
auto accountStore2 = service->Root<Exchange::IStore2>(connectionId, 2000, _T("GrpcStore2"));
if (accountStore2 != nullptr) {
initList1.emplace(Exchange::IStore2::ScopeType::ACCOUNT, accountStore2);
}
_store2 = Core::Service<Store2>::Create<Exchange::IStore2>(initList1);
if (deviceStore2 != nullptr) {
deviceStore2->Release();
}
if (accountStore2 != nullptr) {
accountStore2->Release();

_accountStore2 = service->Root<Exchange::IStore2>(connectionId, 2000, _T("GrpcStore2"));
if (_accountStore2 != nullptr) {
_accountStore2->Register(&_store2Sink);
}
_store2->Register(&_store2Sink);
_store = Core::Service<Store>::Create<Exchange::IStore>(_store2);
_storeCache = service->Root<Exchange::IStoreCache>(connectionId, 2000, _T("SqliteStoreCache"));
_storeInspector = service->Root<Exchange::IStoreInspector>(connectionId, 2000, _T("SqliteStoreInspector"));
_storeLimit = service->Root<Exchange::IStoreLimit>(connectionId, 2000, _T("SqliteStoreLimit"));

return result;
}

void PersistentStore::Deinitialize(PluginHost::IShell* /* service */)
{
if (_store != nullptr) {
_store->Release();
_store = nullptr;
if (_deviceStore2 != nullptr) {
_deviceStore2->Unregister(&_store2Sink);
_deviceStore2->Unregister(_store);
_deviceStore2->Release();
_deviceStore2 = nullptr;
}
if (_store2 != nullptr) {
_store2->Unregister(&_store2Sink);
_store2->Release();
_store2 = nullptr;
if (_deviceStoreCache != nullptr) {
_deviceStoreCache->Release();
_deviceStoreCache = nullptr;
}
if (_storeCache != nullptr) {
_storeCache->Release();
_storeCache = nullptr;
if (_deviceStoreInspector != nullptr) {
_deviceStoreInspector->Release();
_deviceStoreInspector = nullptr;
}
if (_storeInspector != nullptr) {
_storeInspector->Release();
_storeInspector = nullptr;
if (_deviceStoreLimit != nullptr) {
_deviceStoreLimit->Release();
_deviceStoreLimit = nullptr;
}
if (_storeLimit != nullptr) {
_storeLimit->Release();
_storeLimit = nullptr;
if (_accountStore2 != nullptr) {
_accountStore2->Unregister(&_store2Sink);
_accountStore2->Release();
_accountStore2 = nullptr;
}
}

Expand Down
Loading

0 comments on commit b19f013

Please sign in to comment.