Launch quickpanel from starter 17/219617/1 accepted/tizen/unified/20191206.121226 submit/tizen/20191206.092624
authordivyanshugautam17 <divyanshu.gm@samsung.com>
Fri, 6 Dec 2019 08:50:07 +0000 (14:20 +0530)
committerdivyanshugautam17 <divyanshu.gm@samsung.com>
Fri, 6 Dec 2019 08:50:07 +0000 (14:20 +0530)
Change-Id: Id431150ef1ca6b84da286d8bd77cd6f06d6a6924

include/common/home_mgr.h [changed mode: 0644->0755]
src/common/home_mgr.c [changed mode: 0644->0755]
src/common/starter.c

old mode 100644 (file)
new mode 100755 (executable)
index 9ec8e18..a31fce9
@@ -21,6 +21,7 @@
 extern int home_mgr_get_home_pid(void);
 extern int home_mgr_get_volume_pid(void);
 extern int home_mgr_get_indicator_pid(void);
+extern int home_mgr_get_quickpanel_pid(void);
 
 extern void home_mgr_init(void *data);
 extern void home_mgr_fini(void);
@@ -28,5 +29,6 @@ extern void home_mgr_fini(void);
 void home_mgr_relaunch_homescreen(void);
 void home_mgr_relaunch_volume(void);
 void home_mgr_relaunch_indicator(void);
+void home_mgr_relaunch_quickpanel(void);
 extern void home_mgr_open_home(const char *appid, const char *key, const char *val);
-// End of a file
+// End of a file
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index fde4656..f4b41ad
 #define DEAD_TIMER_COUNT_MAX 2
 
 #define APPID_INDICATOR "org.tizen.indicator"
+#define APPID_QUICKPANEL "org.tizen.quickpanel"
 
 int errno;
 static struct {
        pid_t home_pid;
        pid_t volume_pid;
        pid_t indicator_pid;
+       pid_t quickpanel_pid;
        int power_off;
 
        Ecore_Timer *dead_timer;
@@ -59,6 +61,7 @@ static struct {
        .home_pid = (pid_t)-1,
        .volume_pid = (pid_t)-1,
        .indicator_pid = (pid_t)-1,
+       .quickpanel_pid = (pid_t)-1,
        .power_off = 0,
 
        .dead_timer = NULL,
@@ -85,6 +88,11 @@ int home_mgr_get_indicator_pid(void)
        return s_home_mgr.indicator_pid;
 }
 
+int home_mgr_get_quickpanel_pid(void)
+{
+       return s_home_mgr.quickpanel_pid;
+}
+
 static void _after_launch_home(int pid)
 {
        if (pid != s_home_mgr.home_pid) {
@@ -264,6 +272,10 @@ static void _after_launch_indicator(int pid)
        s_home_mgr.indicator_pid = pid;
 }
 
+static void _after_launch_quickpanel(int pid)
+{
+       s_home_mgr.quickpanel_pid = pid;
+}
 
 static void _launch_after_home(int pid)
 {
@@ -404,6 +416,10 @@ void home_mgr_relaunch_indicator(void)
        process_mgr_must_launch(APPID_INDICATOR, NULL, NULL, NULL, _after_launch_indicator);
 }
 
+void home_mgr_relaunch_quickpanel(void)
+{
+       process_mgr_must_launch(APPID_QUICKPANEL, NULL, NULL, NULL, _after_launch_quickpanel);
+}
 
 static int _power_off_cb(status_active_key_e key, void *data)
 {
@@ -429,7 +445,7 @@ static Eina_Bool _launch_apps_idler_cb(void *data)
        process_mgr_must_syspopup_launch(SYSPOPUPID_VOLUME, NULL, NULL, NULL, _after_launch_volume);
 #endif
        process_mgr_must_launch(APPID_INDICATOR, NULL, NULL, NULL, _after_launch_indicator);
-
+       process_mgr_must_launch(APPID_QUICKPANEL, NULL, NULL, NULL, _after_launch_quickpanel);
        return ECORE_CALLBACK_CANCEL;
 }
 
index d9515ed..ebfc2b5 100755 (executable)
@@ -193,6 +193,7 @@ static int _check_dead_signal(int pid, void *data)
        int home_pid = 0;
        int volume_pid = 0;
        int indicator_pid = 0;
+       int quickpanel_pid = 0;
 #if LOCKSCREEN_ENABLE
        int lock_pid = 0;
 #endif
@@ -207,6 +208,7 @@ static int _check_dead_signal(int pid, void *data)
        home_pid = home_mgr_get_home_pid();
        volume_pid = home_mgr_get_volume_pid();
        indicator_pid = home_mgr_get_indicator_pid();
+       quickpanel_pid = home_mgr_get_quickpanel_pid();
 #if LOCKSCREEN_ENABLE
        lock_pid = lock_mgr_get_lock_pid();
 #endif
@@ -225,7 +227,11 @@ static int _check_dead_signal(int pid, void *data)
        } else if (pid == indicator_pid) {
                _D("indicator is dead");
                home_mgr_relaunch_indicator();
-       } else {
+       } else if (pid == quickpanel_pid) {
+               _D("quickpanel is dead");
+               home_mgr_relaunch_quickpanel();
+       }
+       else {
                _D("Unknown process, ignore it");
        }