If the aul_is_initialized() returns true, the OnCreate() function returns 0.
Because, it means the aul_launch_init() function and
the aul_launch_argv_handler() function are already called.
Change-Id: Ia7e2be8e97c9d04429b0cc9fb65cf573713d741e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
static char *__locale_dir;
static appcore_base_rotation __rotation;
+extern int aul_is_initialized();
+
appcore_base_tizen_profile_t appcore_base_get_tizen_profile(void)
{
static appcore_base_tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
{
int r;
+ if (aul_is_initialized()) {
+ _ERR("Aul is already initialized");
+ return 0;
+ }
+
r = aul_launch_init(__context.ops.receive, __context.data);
if (r < 0 && r != AUL_R_ECANCELED) {
_ERR("Aul init failed: %d", r);
#include "app-core-cpp/app_core_base.hh"
#include "common/log_private.hh"
+extern "C" int aul_is_initialized();
extern "C" void aul_finalize();
namespace tizen_cpp {
}
int AppCoreBase::OnCreate() {
+ if (aul_is_initialized()) {
+ _E("AUL is already initialized");
+ return 0;
+ }
+
int ret = aul_launch_init([](aul_type type, bundle* b, void* data) -> int {
AppCoreBase* base = reinterpret_cast<AppCoreBase*>(data);
if (base->impl_->core_delegator_) {