From c31ad257cfd316ba6aed1044259ba6f2b896f097 Mon Sep 17 00:00:00 2001 From: tarunkumarmahay1999 Date: Tue, 19 Dec 2023 11:15:02 +0530 Subject: [PATCH] check if OOBE is enabled/disabled on boot Change-Id: Ia46a3ad245479c6483f78edb9f73281696d3cb44 Signed-off-by: tarunkumarmahay1999 --- include/common/oobe_mgr.h | 3 +++ src/common/oobe_mgr.c | 15 +++++++++++++++ src/common/starter.c | 8 ++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/common/oobe_mgr.h b/include/common/oobe_mgr.h index 4f02391..7061cd7 100644 --- a/include/common/oobe_mgr.h +++ b/include/common/oobe_mgr.h @@ -17,6 +17,9 @@ #ifndef OOBE_MGR_H #define OOBE_MGR_H +#include + +bool oobe_is_enabled(void); void oobe_mgr_init(void); void oobe_mgr_fini(void); int oobe_mgr_get_oobe_setup_pid(void); diff --git a/src/common/oobe_mgr.c b/src/common/oobe_mgr.c index a75fdbf..2cffe03 100644 --- a/src/common/oobe_mgr.c +++ b/src/common/oobe_mgr.c @@ -16,9 +16,11 @@ #include "oobe_mgr.h" #include "process_mgr.h" +#include "util.h" #include #include +#include #define OOBE_SETUP_APPID "org.tizen.oobe" @@ -42,6 +44,19 @@ static Eina_Bool _launch_apps_idler_cb(void *data) return ECORE_CALLBACK_CANCEL; } +bool oobe_is_enabled(void) +{ + int state = -1; + int ret = 0; + + ret = vconf_get_bool(VCONFKEY_SETAPPL_OOBE, &state); + if (ret < 0) { + _E("fail to get VCONFKEY_SETAPPL_OOBE: [%d]", ret); + return ret; + } + return state; +} + void oobe_mgr_init(void) { ecore_idler_add(_launch_apps_idler_cb, NULL); diff --git a/src/common/starter.c b/src/common/starter.c index f3d37f2..c07a13a 100755 --- a/src/common/starter.c +++ b/src/common/starter.c @@ -316,8 +316,12 @@ static void _init(void) hw_key_create_window(); home_mgr_init(); - oobe_mgr_init(); - if( oobe_mgr_get_oobe_setup_pid() < 0) + + if(oobe_is_enabled() == TRUE) + { + oobe_mgr_init(); + } + else { home_mgr_relaunch_taskbar(); } -- 2.7.4