#include <mm_sound.h>
#include <mm_player.h>
#include <WidgetDB/WidgetDBMgr.h>
+#include <Commons/WrtAccess/WrtAccess.h>
#include <MMPlayer/EventOnStateChange.h>
#include "MMPlayer.h"
//Check if current installation path should be added
if ((fullName[0] != '/') && (fullName.find("://") == string::npos)) {
try {
+ using namespace WrtDeviceApis::Commons;
std::string installationPath;
- Commons::IWrtWrapperPtr wrapper = event->getWrtWrapper();
- if (!wrapper) {
- LogError("Wrt API not accessible. Can't get installation path.");
- event->setExceptionCode(
- Commons::ExceptionCodes::PlatformException);
- return;
- }
-
- WidgetDB::Api::IWidgetDBPtr widgetDB = WidgetDB::Api::getWidgetDB(
- wrapper->getWidgetId());
+ int widgetId = WrtAccessSingleton::Instance().getWidgetId();
+
+ WidgetDB::Api::IWidgetDBPtr widgetDB =
+ WidgetDB::Api::getWidgetDB(widgetId);
installationPath = widgetDB->getConfigValue(
WidgetDB::Api::ConfigAttribute::INSTALL_PATH);