/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <app_control_internal.h>
#include <app_common.h>
#include <bundle.h>
-#include <Ecore.h>
+#include <dali/internal/system/linux/dali-ecore.h>
#include <system_info.h>
#include <system_settings.h>
mApplicationType = type;
mCallbackManager = CallbackManager::New();
- char* region;
- char* language;
+ char* region = nullptr;
+ char* language = nullptr;
system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, ®ion );
system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &language );
- mRegion = std::string( region );
- mLanguage = std::string( language );
+
+ if (region != nullptr)
+ {
+ mRegion = std::string( region );
+ }
+
+ if ( language != nullptr)
+ {
+ mLanguage = std::string( language );
+ }
}
~Impl()
return resourcePath;
}
+std::string Framework::GetDataPath()
+{
+ std::string result;
+ char* dataPath = app_get_data_path();
+ if( dataPath )
+ {
+ result = dataPath;
+ free(dataPath);
+ }
+ return result;
+}
+
void Framework::SetBundleId(const std::string& id)
{
mBundleId = id;