Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Change-Id: Ie7c7e59aba92bc6920b898b9ce09d0e3ef255596
  • Loading branch information
sangwoo-kang committed Mar 10, 2020
2 parents 8796a00 + 64aeabb commit 6cafba9
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 32 deletions.
13 changes: 8 additions & 5 deletions src/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2019 LG Electronics, Inc.
// Copyright (c) 2012-2020 LG Electronics, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -81,9 +81,12 @@ int main(int argc, char **argv)
sigaction(SIGABRT, &act, NULL);
sigaction(SIGFPE, &act, NULL);

MainDaemon::getInstance().initialize();
MainDaemon::getInstance().start();
MainDaemon::getInstance().finalize();

try {
MainDaemon::getInstance().initialize();
MainDaemon::getInstance().start();
MainDaemon::getInstance().finalize();
} catch(...) {
Logger::info(CLASS_NAME, __FUNCTION__, "Failed to start SAM");
}
return EXIT_SUCCESS;
}
12 changes: 7 additions & 5 deletions src/base/AppDescriptionList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,14 @@ void AppDescriptionList::scanDir(const string& path, const AppLocation& appLocat
}

Done:
for (int i = 0; i < appCount; ++i) {
if (entries[i])
free(entries[i]);
if (entries != NULL) {
for (int i = 0; i < appCount; ++i) {
if (entries[i])
free(entries[i]);
}
free(entries);
entries = NULL;
}
free(entries);
entries = NULL;
return;
}

Expand Down
2 changes: 0 additions & 2 deletions src/base/LaunchPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ friend class LaunchPointList;

const string getImageForRecents() const
{
return m_database["imageForRecents"].asString();

string imageForRecents = "";
if (JValueUtil::getValue(m_database, "imageForRecents", imageForRecents))
m_appDesc->applyFolderPath(imageForRecents);
Expand Down
2 changes: 1 addition & 1 deletion src/base/LunaTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "RunningAppList.h"
#include "util/JValueUtil.h"

const int LunaTask::getDisplayId()
int LunaTask::getDisplayId()
{
// TODO This is temp solution about displayId
// When home app support peropery. Please detete following code block
Expand Down
2 changes: 1 addition & 1 deletion src/base/LunaTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ friend class LunaTaskList;
Logger::warning("LunaTask", __FUNCTION__, Logger::format("errorCode(%d) errorText(%s)", errorCode, errorText.c_str()));
}

const int getDisplayId();
int getDisplayId();
void setDisplayId(const int displayId);

const string getCaller() const
Expand Down
4 changes: 2 additions & 2 deletions src/base/RunningApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ friend class RunningAppList;
m_windowId = windowId;
}

const int getDisplayId() const
int getDisplayId() const
{
return m_displayId;
}
Expand All @@ -125,7 +125,7 @@ friend class RunningAppList;
m_displayId = displayId;
}

const bool isFullWindow() const
bool isFullWindow() const
{
return m_isFullWindow;
}
Expand Down
24 changes: 12 additions & 12 deletions src/base/RunningAppList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ bool RunningAppList::removeByObject(RunningAppPtr runningApp)

for (auto it = m_map.begin(); it != m_map.end(); ++it) {
if ((*it).second == runningApp) {
RunningAppPtr runningApp = it->second;
RunningAppPtr ptr = it->second;
m_map.erase(it);
onRemove(runningApp);
onRemove(ptr);
return true;
}
}
Expand All @@ -251,9 +251,9 @@ bool RunningAppList::removeByInstanceId(const string& instanceId)
{
for (auto it = m_map.begin(); it != m_map.end(); ++it) {
if ((*it).second->getInstanceId() == instanceId) {
RunningAppPtr runningApp = it->second;
RunningAppPtr ptr = it->second;
m_map.erase(it);
onRemove(runningApp);
onRemove(ptr);
return true;
}
}
Expand All @@ -264,9 +264,9 @@ bool RunningAppList::removeByPid(const pid_t pid)
{
for (auto it = m_map.begin(); it != m_map.end(); ++it) {
if ((*it).second->getProcessId() == pid) {
RunningAppPtr runningApp = it->second;
RunningAppPtr ptr = it->second;
m_map.erase(it);
onRemove(runningApp);
onRemove(ptr);
return true;
}
}
Expand All @@ -277,9 +277,9 @@ bool RunningAppList::removeAllByType(AppType type)
{
for (auto it = m_map.cbegin(); it != m_map.cend() ;) {
if (it->second->getLaunchPoint()->getAppDesc()->getAppType() == type) {
RunningAppPtr runningApp = it->second;
RunningAppPtr ptr = it->second;
it = m_map.erase(it);
onRemove(runningApp);
onRemove(ptr);
} else {
++it;
}
Expand All @@ -291,9 +291,9 @@ bool RunningAppList::removeAllByConext(AppType type, const int context)
{
for (auto it = m_map.cbegin(); it != m_map.cend() ;) {
if (it->second->getLaunchPoint()->getAppDesc()->getAppType() == type && it->second->getContext() == context) {
RunningAppPtr runningApp = it->second;
RunningAppPtr ptr = it->second;
it = m_map.erase(it);
onRemove(runningApp);
onRemove(ptr);
} else {
++it;
}
Expand All @@ -305,9 +305,9 @@ bool RunningAppList::removeAllByLaunchPoint(LaunchPointPtr launchPoint)
{
for (auto it = m_map.cbegin(); it != m_map.cend() ;) {
if (it->second->getLaunchPoint() == launchPoint) {
RunningAppPtr runningApp = it->second;
RunningAppPtr ptr = it->second;
it = m_map.erase(it);
onRemove(runningApp);
onRemove(ptr);
} else {
++it;
}
Expand Down
4 changes: 2 additions & 2 deletions src/bus/client/DB8.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2019 LG Electronics, Inc.
// Copyright (c) 2012-2020 LG Electronics, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,7 @@ bool DB8::onResponse(LSHandle* sh, LSMessage* message, void* context)
Logger::logCallResponse(getInstance().getClassName(), __FUNCTION__, response, responsePayload);

if (responsePayload.isNull())
return true;
return false;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/bus/client/DB8.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2019 LG Electronics, Inc.
// Copyright (c) 2012-2020 LG Electronics, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/util/NativeProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class NativeProcess {
void addEnv(map<string, string>& environments);
void addEnv(const string& variable, const string& value);

const pid_t getPid() const
pid_t getPid() const
{
return m_pid;
}
Expand Down

0 comments on commit 6cafba9

Please sign in to comment.