Invoke dbus_method_sync during poweroff for mobile profile 43/216743/3 accepted/tizen/unified/20191105.110657 submit/tizen/20191105.050210
authordivyanshu.gm <divyanshu.gm@samsung.com>
Thu, 31 Oct 2019 11:17:23 +0000 (16:47 +0530)
committerAmritanshu <a.pandia1@samsung.com>
Thu, 31 Oct 2019 11:44:07 +0000 (17:14 +0530)
Change-Id: I5e4641141785e8ec19e864940b9da70b38c3dc8a

src/mobile/hw_key.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 0134a2d..7f400f3
@@ -481,8 +481,6 @@ static Eina_Bool _key_release_cb(void *data, int type, void *event)
        return ECORE_CALLBACK_RENEW;
 }
 
-
-
 static Eina_Bool _key_press_cb(void *data, int type, void *event)
 {
        Evas_Event_Key_Down *ev = event;
@@ -526,6 +524,13 @@ static Eina_Bool _key_press_cb(void *data, int type, void *event)
                return ECORE_CALLBACK_RENEW;
        }
 
+       /* Check for Power off */
+       if (!strcmp(ev->keyname, key_name[KEY_POWER])) {
+               _D("Poweroff called");
+               dbus_util_send_poweroff_signal();
+               return ECORE_CALLBACK_RENEW;
+       }
+
        /* Priority 3 : other keys */
        if (!strcmp(ev->keyname, key_name[KEY_CONFIG])) {
                _D("Launch camera");