Skip to content

Commit

Permalink
LLAMA-5154:Panel fails to come out of standby
Browse files Browse the repository at this point in the history
Reason for change: Added fix to handle exceptions.
Test Procedure:Refer JIRA
Risks: low

Signed-off-by: apatel859 <[email protected]>
  • Loading branch information
apatel859 committed Jan 26, 2022
1 parent a002604 commit c3bba1c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion DisplaySettings/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3786,6 +3786,11 @@ namespace WPEFramework {
return m_powerState;
}

void DisplaySettings::initAudioPortsWorker(void)
{
DisplaySettings::_instance->InitAudioPorts();
}

void DisplaySettings::powerEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
{
if(!DisplaySettings::_instance)
Expand All @@ -3801,7 +3806,20 @@ namespace WPEFramework {
eventData->data.state.curState, eventData->data.state.newState);
m_powerState = eventData->data.state.newState;
if (eventData->data.state.newState == IARM_BUS_PWRMGR_POWERSTATE_ON) {
DisplaySettings::_instance->InitAudioPorts();
try
{
LOGWARN("creating worker thread for initAudioPortsWorker ");
std::thread audioPortInitThread = std::thread(initAudioPortsWorker);
audioPortInitThread.detach();
}
catch(const std::system_error& e)
{
LOGERR("system_error exception in thread creation: %s", e.what());
}
catch(const std::exception& e)
{
LOGERR("exception in thread creation : %s", e.what());
}
}

else {
Expand Down
1 change: 1 addition & 0 deletions DisplaySettings/DisplaySettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ namespace WPEFramework {
uint32_t setMS12ProfileSettingsOverride(const JsonObject& parameters, JsonObject& response);
void InitAudioPorts();
void AudioPortsReInitialize();
static void initAudioPortsWorker(void);
//End methods

//Begin events
Expand Down

0 comments on commit c3bba1c

Please sign in to comment.