From: gs86.lee Date: Fri, 17 Jun 2016 10:26:40 +0000 (+0900) Subject: [Common] Fix build error for common profile X-Git-Tag: accepted/tizen/mobile/20160620.121827~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35643248f5901d91faf9485015aa56eb454709a5;p=apps%2Fnative%2Fstarter.git [Common] Fix build error for common profile Change-Id: Ia2c150f26aca6eae724ff3055d02d34704c36a98 --- diff --git a/include/common/home_mgr.h b/include/common/home_mgr.h index 6fd5061..8e48998 100644 --- a/include/common/home_mgr.h +++ b/include/common/home_mgr.h @@ -26,6 +26,5 @@ extern void home_mgr_fini(void); void home_mgr_relaunch_homescreen(void); void home_mgr_relaunch_volume(void); -extern int home_mgr_open_home(const char *pkgname); - +extern void home_mgr_open_home(const char *appid, const char *key, const char *val); // End of a file diff --git a/src/common/home_mgr.c b/src/common/home_mgr.c index d6b4cd6..cccdedc 100644 --- a/src/common/home_mgr.c +++ b/src/common/home_mgr.c @@ -108,20 +108,27 @@ static int _change_home_cb(const char *appid, const char *key, const char *value -#define SERVICE_OPERATION_MAIN_KEY "__APP_SVC_OP_TYPE__" -#define SERVICE_OPERATION_MAIN_VALUE "http://tizen.org/appcontrol/operation/main" -void home_mgr_open_home(const char *appid) +void home_mgr_open_home(const char *appid, const char *key, const char *val) { char *home_appid = NULL; +#ifndef TIZEN_BUILD_TARGET_64 if (!appid) { home_appid = status_active_get()->setappl_selected_package_name; } else { home_appid = (char *) appid; } ret_if(!home_appid); +#else + /* + * If the architecture is 64bit, + * starter will launch menu-screen only. + */ + _D("[64bit] menu-screen will be launched."); + home_appid = MENU_SCREEN_PKG_NAME; +#endif - process_mgr_must_launch(home_appid, SERVICE_OPERATION_MAIN_KEY, SERVICE_OPERATION_MAIN_VALUE, _change_home_cb, _after_launch_home); + process_mgr_must_launch(home_appid, key, val, _change_home_cb, _after_launch_home); } @@ -173,7 +180,7 @@ static int _show_home_cb(status_active_key_e key, void *data) } } - home_mgr_open_home(NULL); + home_mgr_open_home(NULL, NULL, NULL); break; default: _E("False sequence [%d]", seq); @@ -224,7 +231,7 @@ static int _change_selected_package_name(status_active_key_e key, void *data) } } - home_mgr_open_home(appid); + home_mgr_open_home(appid, NULL, NULL); return 1; } diff --git a/src/common/hw_key.c b/src/common/hw_key.c index 4727fc1..71a970c 100644 --- a/src/common/hw_key.c +++ b/src/common/hw_key.c @@ -117,18 +117,15 @@ static void _release_multimedia_key(const char *value) +#define HOME_OP_KEY "__HOME_OP__" +#define HOME_OP_VAL_LAUNCH_BY_HOME_KEY "__LAUNCH_BY_HOME_KEY__" static Eina_Bool _launch_by_home_key(void *data) { - int ret = 0; - if (status_passive_get()->idle_lock_state > VCONFKEY_IDLE_UNLOCK) { return ECORE_CALLBACK_CANCEL; } - ret = home_mgr_open_home(NULL); - if(ret > 0) { - dbus_util_send_home_raise_signal(); - } + home_mgr_open_home(NULL, HOME_OP_KEY, HOME_OP_VAL_LAUNCH_BY_HOME_KEY); return ECORE_CALLBACK_CANCEL; } @@ -141,7 +138,7 @@ static Eina_Bool _home_multi_press_timer_cb(void *data) key_info.home_multi_press_timer = NULL; - if(0 == key_info.homekey_count % 2) { + if (0 == key_info.homekey_count % 2) { key_info.homekey_count = 0; return ECORE_CALLBACK_CANCEL; } else if(key_info.homekey_count >= 3) { @@ -229,11 +226,7 @@ static Eina_Bool _key_release_cb(void *data, int type, void *event) /* Priority 3 : Check the lock status */ if ((status_passive_get()->idle_lock_state == VCONFKEY_IDLE_LOCK) && (status_active_get()->setappl_screen_lock_type_int > SETTING_SCREEN_LOCK_TYPE_NONE)) { - if (!strcmp(ev->keyname, KEY_BACK)) { - _D("Back key is released"); - } else { - _D("phone lock state, ignore home key."); - } + _D("phone lock state, ignore home key."); return ECORE_CALLBACK_RENEW; } @@ -304,7 +297,7 @@ static Eina_Bool _key_press_cb(void *data, int type, void *event) _D("_key_press_cb : %s Pressed", ev->keyname); /* Priority 1 : Cancel */ - /* every reserved events have to be canceld when cancel key is pressed */ + /* every reserved events have to be canceld when cancel key is pressed */ if (!strcmp(ev->keyname, KEY_CANCEL)) { _D("Cancel button is pressed"); key_info.cancel = EINA_TRUE; @@ -525,7 +518,7 @@ void hw_key_destroy_window(void) #define CANCEL_KEY_TIMER_SEC 0.3 -const char *key_name[38] = { +const char *key_name[KEY_NAME_MAX] = { "XF86AudioRaiseVolume", "XF86AudioLowerVolume", "XF86PowerOff", @@ -563,7 +556,6 @@ const char *key_name[38] = { "XF86Game", "XF86VoiceWakeUp_LPSD", "XF86VoiceWakeUp", - "KEY_NAME_MAX", }; @@ -661,18 +653,15 @@ static Eina_Bool _launch_taskmgr_cb(void* data) +#define HOME_OP_KEY "__HOME_OP__" +#define HOME_OP_VAL_LAUNCH_BY_HOME_KEY "__LAUNCH_BY_HOME_KEY__" static Eina_Bool _launch_by_home_key(void *data) { - int ret = 0; - if (status_passive_get()->idle_lock_state > VCONFKEY_IDLE_UNLOCK) { return ECORE_CALLBACK_CANCEL; } - ret = home_mgr_open_home(NULL); - if(ret > 0) { - dbus_util_send_home_raise_signal(); - } + home_mgr_open_home(NULL, HOME_OP_KEY, HOME_OP_VAL_LAUNCH_BY_HOME_KEY); return ECORE_CALLBACK_CANCEL; } @@ -685,7 +674,7 @@ static Eina_Bool _home_multi_press_timer_cb(void *data) key_info.home_multi_press_timer = NULL; - if(0 == key_info.homekey_count % 2) { + if (0 == key_info.homekey_count % 2) { key_info.homekey_count = 0; return ECORE_CALLBACK_CANCEL; } else if(key_info.homekey_count >= 3) { @@ -742,11 +731,7 @@ static Eina_Bool _key_release_cb(void *data, int type, void *event) /* Priority 3 : Check the lock status */ if ((status_passive_get()->idle_lock_state == VCONFKEY_IDLE_LOCK) && (status_active_get()->setappl_screen_lock_type_int > SETTING_SCREEN_LOCK_TYPE_NONE)) { - if (!strcmp(ev->keyname, key_name[KEY_BACK])) { - _D("Back key is released"); - } else { _D("phone lock state, ignore home key."); - } return ECORE_CALLBACK_RENEW; }