2 * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <sys/types.h>
18 #include <sys/socket.h>
27 #include <Ecore_Wayland.h>
28 #include <wayland-client.h>
29 #include <wayland-tbm-client.h>
30 #include <tizen-extension-client-protocol.h>
33 #include <Ecore_Evas.h>
34 #include <Ecore_Input_Evas.h>
35 #include <Elementary.h>
36 #include <glib-object.h>
43 #include <bundle_internal.h>
46 #include "appcore-internal.h"
47 #include "appcore-efl.h"
48 #include <system_info.h>
51 static bool resource_reclaiming = TRUE;
52 static int tmp_val = 0;
58 Ecore_Event_Handler *hshow;
59 Ecore_Event_Handler *hhide;
60 Ecore_Event_Handler *hvchange;
61 Ecore_Event_Handler *hlower;
62 Ecore_Event_Handler *hcmsg; /* WM_ROTATE */
64 Ecore_Timer *mftimer; /* Ecore Timer for memory flushing */
66 struct appcore *app_core;
67 void (*prepare_to_suspend) (void *data);
68 void (*exit_from_suspend) (void *data);
69 struct appcore_ops *ops;
70 void (*mfcb) (void); /* Memory Flushing Callback */
75 int (*rot_cb) (void *event_info, enum appcore_rm, void *);
77 enum appcore_rm rot_mode;
82 static struct ui_priv priv;
84 static const char *_ae_name[AE_MAX] = {
85 [AE_UNKNOWN] = "UNKNOWN",
86 [AE_CREATE] = "CREATE",
87 [AE_TERMINATE] = "TERMINATE",
89 [AE_RESUME] = "RESUME",
91 [AE_LOWMEM_POST] = "LOWMEM_POST",
92 [AE_MEM_FLUSH] = "MEM_FLUSH",
93 [AE_UPDATE_REQUESTED] = "UPDATE_REQUESTED",
96 static const char *_as_name[] = {
98 [AS_CREATED] = "CREATED",
99 [AS_RUNNING] = "RUNNING",
100 [AS_PAUSED] = "PAUSED",
101 [AS_DYING] = "DYING",
104 static bool b_active = FALSE;
105 static bool first_launch = TRUE;
113 static Eina_Bool __visibility_cb(void *data, int type, void *event);
114 static GSList *g_winnode_list;
116 static struct wl_display *dsp;
117 static struct wl_registry *reg;
118 static struct tizen_policy *tz_policy;
119 static bool bg_state = false;
121 static void __wl_listener_cb(void *data, struct wl_registry *reg,
122 uint32_t id, const char *interface, uint32_t ver)
124 if (interface && !strcmp(interface, "tizen_policy")) {
126 tz_policy = wl_registry_bind(reg, id,
127 &tizen_policy_interface, 1);
131 static void __wl_listener_remove_cb(void *data, struct wl_registry *reg,
137 static const struct wl_registry_listener reg_listener = {
139 __wl_listener_remove_cb
142 static int __init_wl(void)
144 _DBG("initialize wayland");
145 dsp = wl_display_connect(NULL);
147 _ERR("Failed to connect wl display");
151 reg = wl_display_get_registry(dsp);
153 _ERR("Failed to get registry");
154 wl_display_disconnect(dsp);
158 wl_registry_add_listener(reg, ®_listener, NULL);
159 wl_display_roundtrip(dsp);
162 _ERR("Failed to get tizen policy interface");
163 wl_registry_destroy(reg);
164 wl_display_disconnect(dsp);
171 static void __finish_wl(void)
174 tizen_policy_destroy(tz_policy);
179 wl_registry_destroy(reg);
184 wl_display_disconnect(dsp);
189 static void __set_bg_state(void)
194 tizen_policy_set_background_state(tz_policy, getpid());
195 wl_display_roundtrip(dsp);
197 _DBG("bg state: %d", bg_state);
200 static void __unset_bg_state(void)
205 tizen_policy_unset_background_state(tz_policy, getpid());
206 wl_display_roundtrip(dsp);
208 _DBG("bg state: %d", bg_state);
212 static void __appcore_efl_prepare_to_suspend(void *data)
214 struct ui_priv *ui = (struct ui_priv *)data;
215 struct sys_op *op = NULL;
216 int suspend = APPCORE_SUSPENDED_STATE_WILL_ENTER_SUSPEND;
218 if (ui->app_core && !ui->app_core->allowed_bg && !ui->app_core->suspended_state) {
219 op = &ui->app_core->sops[SE_SUSPENDED_STATE];
221 op->func((void *)&suspend, op->data); /* calls c-api handler */
223 ui->app_core->suspended_state = true;
225 _DBG("[__SUSPEND__]");
228 static void __appcore_efl_exit_from_suspend(void *data)
230 struct ui_priv *ui = (struct ui_priv *)data;
231 struct sys_op *op = NULL;
232 int suspend = APPCORE_SUSPENDED_STATE_DID_EXIT_FROM_SUSPEND;
234 if (ui->app_core && !ui->app_core->allowed_bg && ui->app_core->suspended_state) {
235 op = &ui->app_core->sops[SE_SUSPENDED_STATE];
237 op->func((void *)&suspend, op->data); /* calls c-api handler */
239 ui->app_core->suspended_state = false;
241 _DBG("[__SUSPEND__]");
244 static void __appcore_efl_update_requested(void *data)
246 struct ui_priv *ui = (struct ui_priv *)data;
251 op = &ui->app_core->sops[SE_UPDATE_REQUESTED];
253 op->func((void *)&dummy, op->data);
255 _DBG("[__UPDATE_REQUESTED__]");
258 #if defined(MEMORY_FLUSH_ACTIVATE)
259 static Eina_Bool __appcore_memory_flush_cb(void *data)
261 struct ui_priv *ui = (struct ui_priv *)data;
263 appcore_flush_memory();
267 if (_APPFW_FEATURE_BACKGROUND_MANAGEMENT && ui && ui->prepare_to_suspend) {
268 _DBG("[__SUSPEND__] flush case");
269 ui->prepare_to_suspend(ui);
272 return ECORE_CALLBACK_CANCEL;
275 static int __appcore_low_memory_post_cb(struct ui_priv *ui)
277 if (ui->state == AS_PAUSED)
278 appcore_flush_memory();
285 static void __appcore_timer_add(struct ui_priv *ui)
287 ui->mftimer = ecore_timer_add(5, __appcore_memory_flush_cb, ui);
290 static void __appcore_timer_del(struct ui_priv *ui)
293 ecore_timer_del(ui->mftimer);
300 static int __appcore_low_memory_post_cb(ui_priv *ui)
305 #define __appcore_timer_add(ui) 0
306 #define __appcore_timer_del(ui) 0
310 static void __appcore_efl_memory_flush_cb(void)
312 _DBG("[APP %d] __appcore_efl_memory_flush_cb()", _pid);
313 elm_cache_all_flush();
315 static void wl_raise_win(void)
317 Ecore_Wl_Window *win;
318 unsigned int win_id = appcore_get_main_window();
320 _DBG("Raise window: %d", win_id);
321 win = ecore_wl_window_find(win_id);
322 ecore_wl_window_activate(win);
325 static void wl_pause_win(void)
327 Ecore_Wl_Window *win;
328 GSList *wlist = g_winnode_list;
329 struct win_node *entry = NULL;
331 _DBG("Pause window");
336 _DBG("Pause window: %d", entry->win);
337 win = ecore_wl_window_find(entry->win);
338 ecore_wl_window_iconified_set(win, EINA_TRUE);
345 static void __do_app(enum app_event event, void *data, bundle * b)
348 struct ui_priv *ui = data;
349 const char *below_app;
350 const char *bg_launch;
352 _DBG("[APP %d] Event: %d", _pid, event);
353 _ret_if(ui == NULL || event >= AE_MAX);
354 _DBG("[APP %d] Event: %s State: %s", _pid, _ae_name[event],
355 _as_name[ui->state]);
357 if (event == AE_MEM_FLUSH) {
362 if (event == AE_LOWMEM_POST) {
363 if (__appcore_low_memory_post_cb(ui) == 0)
367 if (!(ui->state == AS_PAUSED && event == AE_PAUSE))
368 __appcore_timer_del(ui);
370 if (ui->state == AS_DYING) {
371 _ERR("Skip the event in dying state");
375 if (event == AE_TERMINATE) {
376 _DBG("[APP %d] TERMINATE", _pid);
378 aul_status_update(STATUS_DYING);
382 if (event == AE_RAISE) {
387 if (event == AE_LOWER) {
392 _ret_if(ui->ops == NULL);
396 _DBG("[APP %d] RESET", _pid);
397 if (ui->pending_data)
398 bundle_free(ui->pending_data);
399 ui->pending_data = bundle_dup(b);
400 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:reset:start]", ui->name);
404 ui->below_app = NULL;
407 below_app = bundle_get_val(b, AUL_SVC_K_RELOCATE_BELOW);
409 ui->below_app = strdup(below_app);
410 if (_APPFW_FEATURE_BACKGROUND_MANAGEMENT && ui->exit_from_suspend) {
411 _DBG("[__SUSPEND__] reset case");
412 ui->exit_from_suspend(ui);
415 if (ui->ops->reset) {
416 traceBegin(TTRACE_TAG_APPLICATION_MANAGER,
418 r = ui->ops->reset(b, ui->ops->data);
419 traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
421 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:reset:done]", ui->name);
424 if (_APPFW_FEATURE_BACKGROUND_MANAGEMENT && ui->app_core->allowed_bg)
425 __appcore_timer_add(ui);
426 first_launch = FALSE;
428 _INFO("[APP %d] App already running, raise the window", _pid);
430 bg_launch = bundle_get_val(b, AUL_SVC_K_BG_LAUNCH);
431 if (!bg_launch || strcmp(bg_launch, "enable"))
436 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:reset:done]",
440 if (ui->state == AS_RUNNING) {
441 _DBG("[APP %d] PAUSE", _pid);
442 if (ui->ops->pause) {
443 traceBegin(TTRACE_TAG_APPLICATION_MANAGER,
445 r = ui->ops->pause(ui->ops->data);
446 traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
448 ui->state = AS_PAUSED;
449 if (r >= 0 && resource_reclaiming == TRUE)
450 __appcore_timer_add(ui);
451 else if (_APPFW_FEATURE_BACKGROUND_MANAGEMENT && r >= 0 && resource_reclaiming == FALSE
452 && ui->prepare_to_suspend) {
453 _DBG("[__SUSPEND__] pause case");
454 ui->prepare_to_suspend(ui);
457 /* TODO : rotation stop */
458 /* r = appcore_pause_rotation_cb(); */
459 aul_status_update(STATUS_BG);
462 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:resume:start]",
464 if (_APPFW_FEATURE_BACKGROUND_MANAGEMENT) {
465 if (ui->exit_from_suspend) {
466 _DBG("[__SUSPEND__] resume case");
467 ui->exit_from_suspend(ui);
469 if (ui->app_core->allowed_bg)
470 __appcore_timer_del(ui);
473 if (ui->state == AS_PAUSED || ui->state == AS_CREATED) {
474 _DBG("[APP %d] RESUME", _pid);
476 if (ui->state == AS_CREATED) {
477 bundle_free(ui->pending_data);
478 ui->pending_data = NULL;
481 if (ui->ops->resume) {
482 traceBegin(TTRACE_TAG_APPLICATION_MANAGER,
484 ui->ops->resume(ui->ops->data);
485 traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
487 ui->state = AS_RUNNING;
490 aul_app_group_activate_below(ui->below_app);
492 ui->below_app = NULL;
495 /*TODO : rotation start*/
496 /* r = appcore_resume_rotation_cb(); */
497 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:resume:done]",
499 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:Launching:done]",
501 aul_status_update(STATUS_VISIBLE);
503 case AE_TERMINATE_BGAPP:
504 if (ui->state == AS_PAUSED) {
505 _DBG("[APP %d] is paused. TERMINATE", _pid);
506 ui->state = AS_DYING;
507 aul_status_update(STATUS_DYING);
509 } else if (ui->state == AS_RUNNING) {
510 _DBG("[APP %d] is running.", _pid);
512 _DBG("[APP %d] is another state", _pid);
515 case AE_UPDATE_REQUESTED:
516 __appcore_efl_update_requested(ui);
524 static struct ui_ops efl_ops = {
529 static bool __check_visible(void)
532 struct win_node *entry = NULL;
534 _DBG("[EVENT_TEST][EVENT] __check_visible\n");
536 for (iter = g_winnode_list; iter != NULL; iter = g_slist_next(iter)) {
538 _DBG("win : %x obscured : %d\n", entry->win, entry->bfobscured);
539 if (entry->bfobscured == FALSE)
546 static GSList *__find_win(unsigned int win)
551 for (iter = g_winnode_list; iter; iter = g_slist_next(iter)) {
553 if (t && t->win == win)
560 static bool __add_win(unsigned int win, unsigned int surf)
565 _DBG("[EVENT_TEST][EVENT] __add_win WIN:%x\n", win);
570 _DBG("[EVENT_TEST][EVENT] ERROR There is already window : %x \n", win);
574 t = calloc(1, sizeof(struct win_node));
580 t->bfobscured = FALSE;
582 g_winnode_list = g_slist_append(g_winnode_list, t);
587 static bool __delete_win(unsigned int win)
594 _DBG("[EVENT_TEST][EVENT] ERROR There is no window : %x \n",
600 g_winnode_list = g_slist_delete_link(g_winnode_list, f);
605 static bool __update_win(unsigned int win, unsigned int surf, bool bfobscured)
610 _DBG("[EVENT_TEST][EVENT] __update_win WIN:%x fully_obscured %d\n", win,
616 _DBG("[EVENT_TEST][EVENT] ERROR There is no window : %x \n", win);
620 t = (struct win_node *)f->data;
624 t->bfobscured = bfobscured;
629 static Eina_Bool __show_cb(void *data, int type, void *event)
631 Ecore_Wl_Event_Window_Show *ev;
634 if (ev->parent_win != 0) {
635 /* This is child window. Skip!!! */
636 return ECORE_CALLBACK_PASS_ON;
639 _DBG("[EVENT_TEST][EVENT] GET SHOW EVENT!!!. WIN:%x, %d\n", ev->win, ev->data[0]);
641 if (!__find_win((unsigned int)ev->win))
642 __add_win((unsigned int)ev->win, (unsigned int)ev->data[0]);
644 __update_win((unsigned int)ev->win, (unsigned int)ev->data[0], FALSE);
647 appcore_group_attach();
648 return ECORE_CALLBACK_RENEW;
651 static Eina_Bool __hide_cb(void *data, int type, void *event)
653 Ecore_Wl_Event_Window_Hide *ev;
658 _DBG("[EVENT_TEST][EVENT] GET HIDE EVENT!!!. WIN:%x\n", ev->win);
660 if (__find_win((unsigned int)ev->win)) {
661 __delete_win((unsigned int)ev->win);
662 bvisibility = __check_visible();
663 if (!bvisibility && b_active == TRUE) {
664 _DBG(" Go to Pasue state \n");
666 __do_app(AE_PAUSE, data, NULL);
670 return ECORE_CALLBACK_RENEW;
673 static Eina_Bool __lower_cb(void *data, int type, void *event)
675 Ecore_Wl_Event_Window_Lower *ev;
677 if (!ev) return ECORE_CALLBACK_RENEW;
678 _DBG("ECORE_WL_EVENT_WINDOW_LOWER window id:%u\n", ev->win);
679 appcore_group_lower();
680 return ECORE_CALLBACK_RENEW;
683 static Eina_Bool __visibility_cb(void *data, int type, void *event)
685 Ecore_Wl_Event_Window_Visibility_Change *ev;
688 __update_win((unsigned int)ev->win, 0, ev->fully_obscured);
689 bvisibility = __check_visible();
691 _DBG("bvisibility %d, b_active %d", bvisibility, b_active);
693 if (bvisibility && b_active == FALSE) {
694 _DBG(" Go to Resume state\n");
696 __do_app(AE_RESUME, data, NULL);
698 } else if (!bvisibility && b_active == TRUE) {
699 _DBG(" Go to Pasue state \n");
701 __do_app(AE_PAUSE, data, NULL);
703 _DBG(" No change state \n");
705 return ECORE_CALLBACK_RENEW;
709 static void __add_climsg_cb(struct ui_priv *ui)
713 ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_SHOW, __show_cb, ui);
715 ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_HIDE, __hide_cb, ui);
717 ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE,
718 __visibility_cb, ui);
720 ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_LOWER,
724 static int __before_loop(struct ui_priv *ui, int *argc, char ***argv)
728 struct appcore *ac = NULL;
730 const char *bg_launch;
732 if (argc == NULL || argv == NULL) {
733 _ERR("argc/argv is NULL");
738 #if !(GLIB_CHECK_VERSION(2, 36, 0))
741 elm_init(*argc, *argv);
743 hwacc = getenv("HWACC");
745 _DBG("elm_config_accel_preference_set is not called");
746 } else if (strcmp(hwacc, "USE") == 0) {
747 elm_config_accel_preference_set("hw");
748 _DBG("elm_config_accel_preference_set : hw");
749 } else if (strcmp(hwacc, "NOT_USE") == 0) {
750 elm_config_accel_preference_set("none");
751 _DBG("elm_config_accel_preference_set : none");
753 _DBG("elm_config_accel_preference_set is not called");
756 r = appcore_init(ui->name, &efl_ops, *argc, *argv);
757 _retv_if(r == -1, -1);
759 if (_APPFW_FEATURE_BACKGROUND_MANAGEMENT) {
760 appcore_get_app_core(&ac);
762 SECURE_LOGD("[__SUSPEND__] appcore initialized, appcore addr: #%x", ac);
765 b = bundle_import_from_argv(*argc, *argv);
767 bg_launch = bundle_get_val(b, AUL_SVC_K_BG_LAUNCH);
768 if (bg_launch && strcmp(bg_launch, "enable") == 0)
774 LOG(LOG_DEBUG, "LAUNCH", "[%s:Platform:appcore_init:done]", ui->name);
775 if (ui->ops && ui->ops->create) {
776 traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:CREATE");
777 r = ui->ops->create(ui->ops->data);
778 traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
780 _ERR("create() return error");
782 if (ui->ops && ui->ops->terminate) {
783 traceBegin(TTRACE_TAG_APPLICATION_MANAGER,
784 "APPCORE:TERMINATE");
785 ui->ops->terminate(ui->ops->data);
786 traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
791 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:create:done]",
794 ui->state = AS_CREATED;
801 static void __after_loop(struct ui_priv *ui)
803 appcore_unset_rotation_cb();
806 if (ui->state == AS_RUNNING) {
807 _DBG("[APP %d] PAUSE before termination", _pid);
808 if (ui->ops && ui->ops->pause) {
809 traceBegin(TTRACE_TAG_APPLICATION_MANAGER,
811 ui->ops->pause(ui->ops->data);
812 traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
816 if (ui->ops && ui->ops->terminate) {
817 traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:TERMINATE");
818 ui->ops->terminate(ui->ops->data);
819 traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
822 ui->state = AS_DYING;
825 ecore_event_handler_del(ui->hshow);
827 ecore_event_handler_del(ui->hhide);
829 ecore_event_handler_del(ui->hvchange);
831 ecore_event_handler_del(ui->hlower);
833 __appcore_timer_del(ui);
837 /* Check loader case */
838 if (getenv("AUL_LOADER_INIT")) {
839 unsetenv("AUL_LOADER_INIT");
844 static int __set_data(struct ui_priv *ui, const char *name,
845 struct appcore_ops *ops)
848 _ERR("Mainloop already started");
853 if (name == NULL || name[0] == '\0') {
854 _ERR("Invalid name");
865 ui->name = strdup(name);
866 _retv_if(ui->name == NULL, -1);
869 ui->mfcb = __appcore_efl_memory_flush_cb;
873 ui->wm_rot_supported = 0;
876 ui->rot_cb_data = NULL;
877 ui->rot_mode = APPCORE_RM_UNKNOWN;
879 if (_APPFW_FEATURE_BACKGROUND_MANAGEMENT) {
881 ui->prepare_to_suspend = __appcore_efl_prepare_to_suspend;
882 ui->exit_from_suspend = __appcore_efl_exit_from_suspend;
888 static void __unset_data(struct ui_priv *ui)
891 free((void *)ui->name);
893 memset(ui, 0, sizeof(struct ui_priv));
896 EXPORT_API int appcore_efl_init(const char *name, int *argc, char ***argv,
897 struct appcore_ops *ops)
901 LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:main:done]", name);
903 r = __set_data(&priv, name, ops);
904 _retv_if(r == -1, -1);
906 r = __before_loop(&priv, argc, argv);
908 aul_status_update(STATUS_DYING);
916 EXPORT_API void appcore_efl_fini(void)
918 aul_status_update(STATUS_DYING);
925 EXPORT_API int appcore_efl_main(const char *name, int *argc, char ***argv,
926 struct appcore_ops *ops)
930 r = appcore_efl_init(name, argc, argv, ops);
931 _retv_if(r == -1, -1);
940 EXPORT_API int appcore_set_system_resource_reclaiming(bool enable)
942 resource_reclaiming = enable;
947 EXPORT_API int appcore_set_app_state(int state)
956 EXPORT_API int appcore_set_preinit_window_name(const char *win_name)
959 void *preinit_window = NULL;
960 const Evas *e = NULL;
963 _ERR("invalid parameter");
967 preinit_window = elm_win_precreated_object_get();
968 if (!preinit_window) {
969 _ERR("Failed to get preinit window");
973 e = evas_object_evas_get((const Evas_Object *)preinit_window);
975 Ecore_Evas *ee = ecore_evas_ecore_evas_get(e);
977 ecore_evas_name_class_set(ee, win_name, win_name);
985 EXPORT_API unsigned int appcore_get_main_window(void)
987 struct win_node *entry = NULL;
989 if (g_winnode_list != NULL) {
990 entry = g_winnode_list->data;
991 return (unsigned int) entry->win;
997 EXPORT_API unsigned int appcore_get_main_surface(void)
999 struct win_node *entry = NULL;
1001 if (g_winnode_list != NULL) {
1002 entry = g_winnode_list->data;
1003 return (unsigned int) entry->surf;
1009 tizen_profile_t _get_tizen_profile()
1011 static tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
1012 if (__builtin_expect(profile != TIZEN_PROFILE_UNKNOWN, 1))
1016 system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
1017 switch (*profileName) {
1020 profile = TIZEN_PROFILE_MOBILE;
1024 profile = TIZEN_PROFILE_WEARABLE;
1028 profile = TIZEN_PROFILE_TV;
1032 profile = TIZEN_PROFILE_IVI;
1034 default: // common or unTIZEN_nown ==> ALL ARE COMMON.
1035 profile = TIZEN_PROFILE_COMMON;