src/common/starter.c
src/common/popup.c
src/common/hw_key.c
+ src/common/oobe_mgr.c
)
ELSEIF("${TIZEN_PROFILE_NAME}" STREQUAL "MOBILE")
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OOBE_MGR_H
+#define OOBE_MGR_H
+
+void oobe_mgr_init(void);
+void oobe_mgr_fini(void);
+int oobe_mgr_get_oobe_setup_pid(void);
+void oobe_mgr_oobe_setup_terminated(void);
+
+#endif /* end of include guard: OOBE_MGR_H */
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "oobe_mgr.h"
+#include "process_mgr.h"
+
+#include <unistd.h>
+#include <Ecore.h>
+
+#define OOBE_SETUP_APPID "org.tizen.oobe"
+
+static struct {
+ pid_t oobe_setup_pid;
+} g_oobe_mgr;
+
+static void _after_launch_oobe_setup(int pid)
+{
+ g_oobe_mgr.oobe_setup_pid = pid;
+}
+
+static void oobe_mgr_launch_oobe_setup()
+{
+ process_mgr_must_launch(OOBE_SETUP_APPID, NULL, NULL, NULL, _after_launch_oobe_setup);
+}
+
+static Eina_Bool _launch_apps_idler_cb(void *data)
+{
+ oobe_mgr_launch_oobe_setup();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+void oobe_mgr_init(void)
+{
+ ecore_idler_add(_launch_apps_idler_cb, NULL);
+}
+
+void oobe_mgr_fini(void)
+{
+ if (g_oobe_mgr.oobe_setup_pid > 0)
+ process_mgr_terminate_app(g_oobe_mgr.oobe_setup_pid, 1);
+}
+
+int oobe_mgr_get_oobe_setup_pid(void)
+{
+ return g_oobe_mgr.oobe_setup_pid;
+}
+
+void oobe_mgr_oobe_setup_terminated(void)
+{
+ g_oobe_mgr.oobe_setup_pid = 0;
+}
#include "util.h"
#include "status.h"
#include "hw_key.h"
+#include "oobe_mgr.h"
#define LOCKSCREEN_ENABLE 0
#if LOCKSCREEN_ENABLE
int lock_pid = 0;
#endif
+ int oobe_setup_pid = 0;
_D("Process %d is termianted", pid);
#if LOCKSCREEN_ENABLE
lock_pid = lock_mgr_get_lock_pid();
#endif
+ oobe_setup_pid = oobe_mgr_get_oobe_setup_pid();
if (pid == home_pid) {
_D("Homescreen is dead");
} else if (pid == quickpanel_pid) {
_D("quickpanel is dead");
home_mgr_relaunch_quickpanel();
- }
- else {
+ } else if (pid == oobe_setup_pid) {
+ _D("oobe setup is dead");
+ oobe_mgr_oobe_setup_terminated();
+ } else {
_D("Unknown process, ignore it");
}
hw_key_create_window();
home_mgr_init(NULL);
+ oobe_mgr_init();
r = aul_listen_app_dead_signal(_check_dead_signal, NULL);
if (r < 0) {
#if LOCKSCREEN_ENABLE
lock_mgr_daemon_end();
#endif
+ oobe_mgr_fini();
status_active_unregister_cb(STATUS_ACTIVE_KEY_SYSMAN_POWER_OFF_STATUS, _power_off_cb);
status_active_unregister_cb(STATUS_ACTIVE_KEY_BOOT_ANIMATION_FINISHED, _boot_animation_finished_cb);