Move 'Location service' into "Privacy and safty" 37/101237/1 accepted/tizen/3.0/mobile/20161201.031928 submit/tizen_3.0/20161130.122308
authorkiso.chang <kiso.chang@samsung.com>
Tue, 29 Nov 2016 11:57:03 +0000 (20:57 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Wed, 30 Nov 2016 12:17:39 +0000 (21:17 +0900)
- Remove 'More connections' and Modify 'Privacy and Safty'

Conflicts:
setting-privacy/CMakeLists.txt

Change-Id: I973df3880ec78c08485d28130e0858ce97e80e51

13 files changed:
CMakeLists.txt [changed mode: 0644->0755]
org.tizen.setting.xml.in
setting-common/src/setting-cfg.c
setting-moreconnections/CMakeLists.txt [deleted file]
setting-moreconnections/include/setting-moreconnections-main.h [deleted file]
setting-moreconnections/include/setting-moreconnections.h [deleted file]
setting-moreconnections/src/setting-moreconnections-main.c [deleted file]
setting-moreconnections/src/setting-moreconnections.c [deleted file]
setting-privacy/CMakeLists.txt [new file with mode: 0755]
setting-privacy/include/setting-privacy-main.h [new file with mode: 0755]
setting-privacy/include/setting-privacy.h [new file with mode: 0755]
setting-privacy/src/setting-privacy-main.c [new file with mode: 0755]
setting-privacy/src/setting-privacy.c [new file with mode: 0755]

old mode 100644 (file)
new mode 100755 (executable)
index b925c01..43ddc45
@@ -22,7 +22,6 @@ SET(SETTING_CONNECTIVITY setting-connectivity)
 SET(SETTING_LOCKTYPE setting-locktype)
 SET(SETTING_DISPLAY setting-display)
 SET(SETTING_APPLICATIONS setting-applications)
-SET(SETTING_MORECONNECTIONS setting-moreconnections)
 SET(SETTING_TIME setting-time)
 SET(SETTING_LANGUAGE_AND_INPUT setting-language-and-input)
 SET(SETTING_LICENSE setting-license)
@@ -38,6 +37,7 @@ SET(SETTING_APPMGR setting-appmgr)
 SET(SETTING_FLIGHTMODE setting-flightmode)
 SET(SETTING_ACCESSIBILITY setting-accessibility)
 SET(SETTING_SMARTMANAGER setting-smartmanager)
+SET(SETTING_PRIVACY setting-privacy)
 
 SET(LIB_SETTING_COMMON setting-common)
 
@@ -94,7 +94,6 @@ ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_CONNECTIVITY})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_DISPLAY})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_NETWORK})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_APPLICATIONS})
-ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_MORECONNECTIONS})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PROFILE})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_LOCKTYPE})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_TIME})
@@ -107,4 +106,5 @@ ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_APPMGR})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_FLIGHTMODE})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_ACCESSIBILITY})
 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_SMARTMANAGER})
+ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PRIVACY})
 
index f92edc197b9b124333c1e15510e5f04aaa8081a9..a235e945d6542ebb5f3afe4d82a15c9e8da2e2b4 100755 (executable)
                <label xml:lang="en-ph">Locktype</label>
                <label xml:lang="en-us">Locktype</label>
        </ui-application>
-       <ui-application appid="org.tizen.setting-moreconnections" exec="@TZ_SYS_RO_APP@/org.tizen.setting/bin/setting-moreconnections" nodisplay="true" multiple="false" type="capp" taskmanage="false" hw-acceleration="on" launch_mode="caller">
+       <ui-application appid="org.tizen.setting-privacy" exec="@TZ_SYS_RO_APP@/org.tizen.setting/bin/setting-privacy" nodisplay="true" multiple="false" type="capp" taskmanage="false" hw-acceleration="on" launch_mode="caller">
                <metadata key="http://developer.samsung.com/tizen/metadata/legacylifecycle"/>
-               <label>Settings More Connections</label>
-               <label xml:lang="en-gb">Settings More Connections</label>
-               <label xml:lang="en-ph">Settings More Connections</label>
-               <label xml:lang="en-us">Settings More Connections</label>
+               <label>Privacy and security</label>
+               <label xml:lang="en-gb">Privacy and security</label>
+               <label xml:lang="en-ph">Privacy and security</label>
+               <label xml:lang="en-us">Privacy and security</label>
        </ui-application>
        <ui-application appid="org.tizen.setting-network" exec="@TZ_SYS_RO_APP@/org.tizen.setting/bin/setting-network" nodisplay="true" multiple="true" type="capp" taskmanage="false" hw-acceleration="on" launch_mode="caller">
                <metadata key="http://developer.samsung.com/tizen/metadata/legacylifecycle"/>
index 38d0deedc15f85b5477b01eeb9b933e13e3622ce..a51cb20f1d3377001bdce8eb27788fd89955ec07 100755 (executable)
@@ -258,21 +258,6 @@ static Setting_Cfg_Node_T s_cfg_node_array[] = {
                0,
                "org.tizen.setting-network"},
 #endif
-       /*More connections */
-       {       KeyStr_MoreConnectionSettings,
-               IMG_More_Connections,
-               "org.tizen.setting-moreconnections",
-               Cfg_Item_Pos_Level0,
-               Cfg_Item_Resetable,
-               0,
-               Cfg_Item_AppLauncher_Node,
-               NULL,
-               KeyStr_Connections,
-               NULL,
-               uuid_Network,
-               0,
-               "org.tizen.setting-moreconnections"},
-
        {       KeyStr_Convergence,
                IMG_Convergence,
                "org.tizen.d2d-conv-setting",
@@ -377,22 +362,23 @@ static Setting_Cfg_Node_T s_cfg_node_array[] = {
                uuid_Accounts,
                0,
                "org.tizen.setting-accessibility"},
-       {       KeyStr_Accounts,
-               IMG_Accounts,
-               "setting-myaccount-efl|mode:account_list",
+       /*Privacy and security */
+       {       KeyStr_Privacy,
+               IMG_Privacy,
+               "org.tizen.setting-privacy",
                Cfg_Item_Pos_Level0,
-               Cfg_Item_unResetable,
+               Cfg_Item_Resetable,
                0,
                Cfg_Item_AppLauncher_Node,
                NULL,
                KeyStr_Personal,
                NULL,
-               uuid_Accounts,
+               uuid_Network,
                0,
-               "setting-myaccount-efl"},
-       {       KeyStr_Privacy,
-               IMG_Privacy,
-               "org.tizen.privacy-setting",
+               "org.tizen.setting-privacy"},
+       {       KeyStr_Accounts,
+               IMG_Accounts,
+               "setting-myaccount-efl|mode:account_list",
                Cfg_Item_Pos_Level0,
                Cfg_Item_unResetable,
                0,
@@ -402,7 +388,7 @@ static Setting_Cfg_Node_T s_cfg_node_array[] = {
                NULL,
                uuid_Accounts,
                0,
-               "org.tizen.privacy-setting"},
+               "setting-myaccount-efl"},
 
        /* Group: System */
        {       KeyStr_System, NULL, "move://Tab4.top", Cfg_Item_Pos_Level0, 0,
diff --git a/setting-moreconnections/CMakeLists.txt b/setting-moreconnections/CMakeLists.txt
deleted file mode 100644 (file)
index 85df48e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-SET(PROJECT_SETTING_MORECONNECTIONS "setting-moreconnections")
-SET(SETTING_PKG_MORECONNECTIONS "org.tizen.setting-moreconnections")
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs_moreconnections REQUIRED
-               appcore-common
-               appcore-efl
-               capi-appfw-application
-               #capi-location-manager
-               capi-system-device
-               deviced
-               dlog
-               ecore
-               edje
-               efl-extension
-               elementary
-               evas
-               json-glib-1.0
-               libtzplatform-config
-               ui-gadget-1
-               vconf
-)
-
-FOREACH(flag ${pkgs_moreconnections_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -Werror")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-shared")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
-
-ADD_EXECUTABLE(${PROJECT_SETTING_MORECONNECTIONS}
-       ./src/setting-moreconnections.c
-       ./src/setting-moreconnections-main.c
-)
-
-TARGET_LINK_LIBRARIES(${PROJECT_SETTING_MORECONNECTIONS} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
-TARGET_LINK_LIBRARIES(${PROJECT_SETTING_MORECONNECTIONS} ${pkgs_moreconnections_LDFLAGS})
-
-INSTALL(PROGRAMS ${PROJECT_SETTING_MORECONNECTIONS} DESTINATION ${TZ_SYS_RO_APP}/${SETTING_PKG_NAME}/bin)
-
diff --git a/setting-moreconnections/include/setting-moreconnections-main.h b/setting-moreconnections/include/setting-moreconnections-main.h
deleted file mode 100644 (file)
index 0cac749..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * setting
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
- *
- * Contact: MyoungJune Park <mj2004.park@samsung.com>
- *
- * 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 __SETTING_MORECONNECTIONS_MAIN_H__
-#define __SETTING_MORECONNECTIONS_MAIN_H__
-
-#include <setting-moreconnections.h>
-
-#endif                         /* __SETTING_MORECONNECTIONS_MAIN_H__ */
diff --git a/setting-moreconnections/include/setting-moreconnections.h b/setting-moreconnections/include/setting-moreconnections.h
deleted file mode 100644 (file)
index 89764dc..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * setting
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
- *
- * Contact: MyoungJune Park <mj2004.park@samsung.com>
- *
- * 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 __SETTING_MORECONNECTIONS_H__
-#define __SETTING_MORECONNECTIONS_H__
-
-#include <stdio.h>
-#include <string.h>
-#include <Elementary.h>
-#include <glib-object.h>
-
-#include "setting-cfg.h"
-#include "setting-common-data-type.h"
-#include "setting-common-draw-widget.h"
-#include "setting-common-init.h"
-#include "setting-common-view.h"
-
-#define KeyStr_On              "IDS_ST_BODY_ON"
-#define KeyStr_Off             "IDS_ST_BODY_ALERTTYPE_OFF"
-#define KeyStr_LocationService "IDS_LBS_BODY_LOCATION_SERVICE"
-#define KeyStr_VPN             "IDS_ST_BODY_VPN"
-
-typedef struct _SettingMoreConnections SettingMoreConnections;
-
-/**
- * Setting MoreConnections context
- */
-struct _SettingMoreConnections {
-       MainData md;
-
-       Setting_GenGroupItem_Data *location_service;
-       Setting_GenGroupItem_Data *VPN;
-
-       /* item class */
-       Elm_Genlist_Item_Class itc_2text_2;
-       Elm_Genlist_Item_Class itc_1text;
-
-       bool empty_flag;
-};
-
-extern setting_view setting_view_moreconnections_main;
-char *setting_location_is_enabled(void *data);
-
-#endif                         /* __SETTING_MORECONNECTIONS_H__ */
diff --git a/setting-moreconnections/src/setting-moreconnections-main.c b/setting-moreconnections/src/setting-moreconnections-main.c
deleted file mode 100644 (file)
index c219e6b..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * setting
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
- *
- * Contact: MyoungJune Park <mj2004.park@samsung.com>
- *
- * 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 "setting-moreconnections-main.h"
-
-static int _view_create(void *cb);
-static int _view_destroy(void *cb);
-static int _view_update(void *cb);
-static int _view_cleanup(void *cb);
-static void _mouse_up_Gendial_list_cb(
-               void *data, Evas_Object *obj, void *event_info);
-
-setting_view setting_view_moreconnections_main = {
-       .create = _view_create,
-       .destroy = _view_destroy,
-       .update = _view_update,
-       .cleanup = _view_cleanup, };
-
-/************************************************
- * @brief Do process when clicking '<-' button
- *
- * @param data application context
- * @param UNUSED
- ************************************************/
-
-static Eina_Bool _cancel_cb(void *data, Elm_Object_Item *it)
-{
-       SETTING_TRACE_BEGIN;
-       ui_app_exit();
-       return EINA_TRUE;
-}
-
-
-static void _mouse_up_Gendial_list_cb(void *data, Evas_Object *obj,
-               void *event_info)
-{
-       Setting_GenGroupItem_Data *list_item = NULL;
-       setting_retm_if(NULL == data, "data is NULL");
-       setting_retm_if(NULL == event_info, "event_info is NULL");
-       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       elm_genlist_item_selected_set(item, 0);
-       list_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item);
-       SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
-
-       if (!safeStrCmp(KeyStr_LocationService, list_item->keyStr))
-               app_launcher("org.tizen.setting-location", NULL, NULL);
-}
-
-/**
- * @brief vconf changed callback
- *
- * @param key the changed vconf key node.
- * @param data application data
- * @param event_info event type
- */
-static void _vconf_changed_cb(keynode_t *key, void *data)
-{
-       SETTING_TRACE_BEGIN;
-       setting_retm_if(NULL == key, "key is NULL");
-       setting_retm_if(NULL == data, "data is NULL");
-       SettingMoreConnections *ad = (SettingMoreConnections *)data;
-
-       int status = vconf_keynode_get_int(key);
-       char *vconf_name = vconf_keynode_get_name(key);
-
-       if (!safeStrCmp(vconf_name, VCONFKEY_LOCATION_USE_MY_LOCATION)) {
-               SETTING_TRACE("status: %d", status);
-               char *sub_desc = setting_location_is_enabled(data);
-               ad->location_service->sub_desc = strdup(sub_desc);
-               elm_object_item_data_set(ad->location_service->item,
-                               ad->location_service);
-               elm_genlist_item_update(ad->location_service->item);
-       } else {
-               SETTING_TRACE_ERROR("vconf_name is error");
-       }
-}
-
-char *setting_location_is_enabled(void *data)
-{
-       SETTING_TRACE_BEGIN;
-
-#if 0
-       bool is_enabled = FALSE;
-       int ret = location_manager_is_enabled_method(LOCATIONS_METHOD_HYBRID,
-                       &is_enabled);
-       SETTING_TRACE("hybrid: %d, ", is_enabled);
-
-       if (true == is_enabled)
-       return KeyStr_On;
-       else if (false == is_enabled)
-       return KeyStr_Off;
-       else
-       return SETTING_VCONF_ERR_RETURN_STR_NULL;
-#else
-       int is_enabled = -1;
-       if (0 != vconf_get_int(VCONFKEY_LOCATION_USE_MY_LOCATION, &is_enabled))
-               SETTING_TRACE_ERROR("Fail to get vconf");
-
-       if (1 == is_enabled)
-               return KeyStr_On;
-       else if (0 == is_enabled)
-               return KeyStr_Off;
-       else
-               return KeyStr_Off;
-       /* @todo : need to check and modify - old return was
-        * KeyStr_OffSETTING_VCONF_ERR_RETURN_STR_NULL */
-#endif
-}
-
-/**************************************************
- * @brief create main view genlist items
- * @param data application data
- * @return FALSE for call it once and then destory the timer, TRUE for always
- * call it when the timer is reached.
- **************************************************/
-int _generate_genlist(SettingMoreConnections *ad)
-{
-       SETTING_TRACE_BEGIN;
-       /* error check */
-       retv_if(!ad, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
-
-       Evas_Object *scroller = ad->md.genlist;
-
-       char *sub_desc = setting_location_is_enabled(ad);
-
-       ad->location_service = setting_create_Gendial_field_def(scroller,
-                       &(ad->itc_2text_2),
-                       _mouse_up_Gendial_list_cb,
-                       ad, SWALLOW_Type_INVALID,
-                       NULL, NULL, 0,
-                       KeyStr_LocationService, sub_desc, NULL);
-       if (ad->location_service) {
-               ad->location_service->sub_desc = strdup(sub_desc);
-               ad->location_service->userdata = ad;
-       } else {
-               SETTING_TRACE_ERROR("ad->location_service is NULL");
-       }
-
-#if 0
-       /* VPN */
-       ad->VPN = setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
-                       setting_moreconnections_main_mouse_up_Gendial_list_cb,
-                       ad, SWALLOW_Type_INVALID,
-                       NULL, NULL, 0,
-                       KeyStr_VPN, NULL, NULL);
-       if (ad->VPN)
-               ad->VPN->userdata = ad;
-       else
-               SETTING_TRACE_ERROR("ad->VPN is NULL");
-#endif
-
-       SETTING_TRACE_END;
-       return SETTING_RETURN_SUCCESS;
-}
-
-/***************************************************
- *
- * basic func
- *
- ***************************************************/
-static int _view_create(void *cb)
-{
-       SETTING_TRACE_BEGIN;
-       int ret;
-       SettingMoreConnections *ad = (SettingMoreConnections *)cb;
-       retv_if(!ad, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
-
-       ret = view_init(&ad->md, _("IDS_ST_HEADER_MORE_CONNECTION_SETTINGS"));
-       if (ret != SETTING_RETURN_SUCCESS)
-               return ret;
-
-       elm_object_style_set(ad->md.genlist, "dialogue");
-       setting_add_back_button(&ad->md, _cancel_cb, ad);
-
-       _generate_genlist(ad);
-
-       ret = vconf_notify_key_changed(VCONFKEY_LOCATION_USE_MY_LOCATION,
-                       _vconf_changed_cb, ad);
-       if (ret != 0)
-               SETTING_TRACE_ERROR("call vconf_notify_key_changed failed");
-       else
-               SETTING_TRACE_ERROR("call vconf_notify_key_changed succeeded");
-
-       setting_view_moreconnections_main.is_create = 1;
-       SETTING_TRACE_END;
-       return SETTING_RETURN_SUCCESS;
-}
-
-static int _view_destroy(void *cb)
-{
-       SETTING_TRACE_BEGIN;
-       /* error check */
-       retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
-       retv_if(!(setting_view_moreconnections_main.is_create),
-                       SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
-
-       SettingMoreConnections *ad = (SettingMoreConnections *)cb;
-
-       int ret = vconf_ignore_key_changed(VCONFKEY_LOCATION_USE_MY_LOCATION,
-                       _vconf_changed_cb);
-       if (ret != 0) {
-               SETTING_TRACE_ERROR(
-                               " >>> call vconf_ignore_key_changed failed");
-       } else {
-               SETTING_TRACE_ERROR(
-                               " >>> call vconf_ignore_key_changed succeeded");
-       }
-
-       if (ad->md.naviframe != NULL) {
-               evas_object_del(ad->md.naviframe);
-               ad->md.naviframe = NULL;
-       }
-
-       setting_view_moreconnections_main.is_create = 0;
-
-       SETTING_TRACE_END;
-       return SETTING_RETURN_SUCCESS;
-}
-
-static int _view_update(void *cb)
-{
-       SETTING_TRACE_BEGIN;
-       return SETTING_RETURN_SUCCESS;
-}
-
-static int _view_cleanup(void *cb)
-{
-       SETTING_TRACE_BEGIN;
-       return SETTING_RETURN_SUCCESS;
-}
diff --git a/setting-moreconnections/src/setting-moreconnections.c b/setting-moreconnections/src/setting-moreconnections.c
deleted file mode 100644 (file)
index 176687d..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * setting
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
- *
- * Contact: MyoungJune Park <mj2004.park@samsung.com>
- *
- * 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 "setting-moreconnections.h"
-
-#define SETTING_MORECONNECTIONS_PACKAGE_NAME "org.tizen.setting-moreconnections"
-
-bool on_app_create(void *priv)
-{
-       SETTING_TRACE_BEGIN;
-       SettingMoreConnections *ad = priv;
-       retv_if(!ad, NULL);
-
-       if (app_init(&ad->md, SETTING_MORECONNECTIONS_PACKAGE_NAME)
-                       != SETTING_RETURN_SUCCESS) {
-               SETTING_TRACE_ERROR("Cannot initialize application");
-               return false;
-       }
-
-       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
-
-       /* register view node table */
-       setting_view_node_table_intialize();
-       setting_view_node_table_register(&setting_view_moreconnections_main,
-                       NULL);
-
-       /*      creating a view. */
-       setting_create_Gendial_itc(SETTING_GENLIST_2LINE_STYLE,
-                       &(ad->itc_2text_2));
-       setting_create_Gendial_itc(SETTING_GENLIST_ICON_1LINE_STYLE,
-                       &(ad->itc_1text));
-
-       setting_view_node_set_cur_view(&setting_view_moreconnections_main);
-       setting_view_create(&setting_view_moreconnections_main, (void *)ad);
-
-       return true;
-}
-
-static void on_app_pause(void *data)
-{
-       SETTING_TRACE_BEGIN;
-}
-
-static void on_app_control(app_control_h service, void *data)
-{
-       SETTING_TRACE_BEGIN;
-       SettingMoreConnections *ad = data;
-       evas_object_show(ad->md.window);
-
-}
-
-static void on_app_resume(void *priv)
-{
-       SETTING_TRACE_BEGIN;
-       char *sub_desc;
-       SettingMoreConnections *ad = priv;
-       ret_if(!priv);
-
-       setting_view_create(&setting_view_moreconnections_main, (void *)ad);
-
-       if (ad->location_service) {
-               sub_desc = setting_location_is_enabled(priv);
-               ad->location_service->sub_desc = strdup(sub_desc);
-               elm_object_item_data_set(ad->location_service->item,
-                               ad->location_service);
-               elm_genlist_item_update(ad->location_service->item);
-       }
-
-       SETTING_TRACE_END;
-}
-
-static void on_app_terminate(void *priv)
-{
-       SETTING_TRACE_BEGIN;
-       SettingMoreConnections *ad = priv;
-
-       /* called when this shared gadget is terminated. similar with
-        * app_exit */
-       setting_view_destroy(&setting_view_moreconnections_main, ad);
-
-       SETTING_TRACE_END;
-}
-
-static void _lang_changed(app_event_info_h event_info, void *data)
-{
-       char *lang = NULL;
-       if (app_event_get_language(event_info, &lang) == APP_ERROR_NONE) {
-               SETTING_TRACE_DEBUG("Setting - language is changed : %s", lang);
-               elm_language_set(lang);
-               elm_config_all_flush();
-               free(lang);
-       } else {
-               SETTING_TRACE_ERROR("Cannot get language from event_info");
-       }
-}
-
-EXPORT_PUBLIC
-int main(int argc, char *argv[])
-{
-       app_event_handler_h handlers[5] = {NULL, };
-       ui_app_lifecycle_callback_s ops = {
-               .create = on_app_create,
-               .app_control = on_app_control,
-               .pause = on_app_pause,
-               .resume = on_app_resume,
-               .terminate = on_app_terminate,
-       };
-       SettingMoreConnections app_data;
-       ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY],
-                       APP_EVENT_LOW_MEMORY, NULL, NULL);
-       ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY],
-                       APP_EVENT_LOW_BATTERY, NULL, NULL);
-       ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED],
-                       APP_EVENT_LANGUAGE_CHANGED, _lang_changed, &app_data);
-       ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED],
-                       APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL);
-       ui_app_add_event_handler(
-                       &handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED],
-                       APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL);
-       memset(&app_data, 0x0, sizeof(app_data));
-       return ui_app_main(argc, argv, &ops, &app_data);
-}
-
diff --git a/setting-privacy/CMakeLists.txt b/setting-privacy/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..09ab642
--- /dev/null
@@ -0,0 +1,53 @@
+SET(PROJECT_SETTING_PRIVACY "setting-privacy")
+SET(SETTING_PKG_PRIVACY "org.tizen.setting-privacy")
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs_privacy REQUIRED
+               appcore-common
+               appcore-efl
+               capi-appfw-application
+               #capi-location-manager
+               capi-system-device
+               deviced
+               dlog
+               ecore
+               edje
+               efl-extension
+               elementary
+               evas
+               json-glib-1.0
+               libtzplatform-config
+               ui-gadget-1
+               vconf
+)
+
+FOREACH(flag ${pkgs_privacy_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -Werror")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+IF("${ARCH}" STREQUAL "arm")
+       ADD_DEFINITIONS("-DTARGET")
+       MESSAGE("add -DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DSLP_DEBUG")
+ADD_DEFINITIONS("-shared")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
+
+ADD_EXECUTABLE(${PROJECT_SETTING_PRIVACY}
+       ./src/setting-privacy.c
+       ./src/setting-privacy-main.c
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_SETTING_PRIVACY} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
+TARGET_LINK_LIBRARIES(${PROJECT_SETTING_PRIVACY} ${pkgs_privacy_LDFLAGS})
+
+INSTALL(PROGRAMS ${PROJECT_SETTING_PRIVACY} DESTINATION ${TZ_SYS_RO_APP}/${SETTING_PKG_NAME}/bin)
+
diff --git a/setting-privacy/include/setting-privacy-main.h b/setting-privacy/include/setting-privacy-main.h
new file mode 100755 (executable)
index 0000000..5db93c1
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * setting
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Contact: MyoungJune Park <mj2004.park@samsung.com>
+ *
+ * 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 __SETTING_PRIVACY_MAIN_H__
+#define __SETTING_PRIVACY_MAIN_H__
+
+#include <setting-privacy.h>
+
+#endif                         /* __SETTING_PRIVACY_MAIN_H__ */
diff --git a/setting-privacy/include/setting-privacy.h b/setting-privacy/include/setting-privacy.h
new file mode 100755 (executable)
index 0000000..26568ff
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * setting
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Contact: MyoungJune Park <mj2004.park@samsung.com>
+ *
+ * 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 __SETTING_PRIVACY_H__
+#define __SETTING_PRIVACY_H__
+
+#include <stdio.h>
+#include <string.h>
+#include <Elementary.h>
+#include <glib-object.h>
+
+#include "setting-cfg.h"
+#include "setting-common-data-type.h"
+#include "setting-common-draw-widget.h"
+#include "setting-common-init.h"
+#include "setting-common-view.h"
+
+#define KeyStr_On              "IDS_ST_BODY_ON"
+#define KeyStr_Off             "IDS_ST_BODY_ALERTTYPE_OFF"
+#define KeyStr_LocationService "IDS_LBS_BODY_LOCATION_SERVICE"
+//#define KeyStr_Privacy               "IDS_ST_BODY_VPN"
+#define KeyStr_ADs             "IDS_ST_BODY_VPN"
+
+/*#define KeyStr_VPN           "IDS_ST_BODY_VPN"*/
+
+typedef struct _SettingPrivacy SettingPrivacy;
+
+/**
+ * Setting MoreConnections context
+ */
+struct _SettingPrivacy {
+       MainData md;
+
+       Setting_GenGroupItem_Data *location_service;
+       Setting_GenGroupItem_Data *VPN;
+
+       /* item class */
+       Elm_Genlist_Item_Class itc_2text_2;
+       Elm_Genlist_Item_Class itc_1text;
+
+       bool empty_flag;
+};
+
+extern setting_view setting_view_privacy_main;
+char *setting_location_is_enabled(void *data);
+
+#endif                         /* __SETTING_MORECONNECTIONS_H__ */
diff --git a/setting-privacy/src/setting-privacy-main.c b/setting-privacy/src/setting-privacy-main.c
new file mode 100755 (executable)
index 0000000..f82f9e9
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+ * setting
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Contact: MyoungJune Park <mj2004.park@samsung.com>
+ *
+ * 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 "setting-privacy-main.h"
+
+static int _view_create(void *cb);
+static int _view_destroy(void *cb);
+static int _view_update(void *cb);
+static int _view_cleanup(void *cb);
+static void _mouse_up_Gendial_list_cb(
+               void *data, Evas_Object *obj, void *event_info);
+
+setting_view setting_view_privacy_main = {
+       .create = _view_create,
+       .destroy = _view_destroy,
+       .update = _view_update,
+       .cleanup = _view_cleanup, };
+
+/************************************************
+ * @brief Do process when clicking '<-' button
+ *
+ * @param data application context
+ * @param UNUSED
+ ************************************************/
+
+static Eina_Bool _cancel_cb(void *data, Elm_Object_Item *it)
+{
+       SETTING_TRACE_BEGIN;
+       ui_app_exit();
+       return EINA_TRUE;
+}
+
+
+static void _mouse_up_Gendial_list_cb(void *data, Evas_Object *obj,
+               void *event_info)
+{
+       Setting_GenGroupItem_Data *list_item = NULL;
+       setting_retm_if(NULL == data, "data is NULL");
+       setting_retm_if(NULL == event_info, "event_info is NULL");
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       elm_genlist_item_selected_set(item, 0);
+       list_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item);
+       SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
+
+       if (!safeStrCmp(KeyStr_LocationService, list_item->keyStr))
+               app_launcher("org.tizen.setting-location", NULL, NULL);
+       else if (!safeStrCmp(KeyStr_Privacy, list_item->keyStr))
+               app_launcher("org.tizen.privacy-setting", NULL, NULL);
+       if (!safeStrCmp(KeyStr_ADs, list_item->keyStr))
+               app_launcher("org.tizen.settings-adid", NULL, NULL);
+}
+
+/**
+ * @brief vconf changed callback
+ *
+ * @param key the changed vconf key node.
+ * @param data application data
+ * @param event_info event type
+ */
+static void _vconf_changed_cb(keynode_t *key, void *data)
+{
+       SETTING_TRACE_BEGIN;
+       setting_retm_if(NULL == key, "key is NULL");
+       setting_retm_if(NULL == data, "data is NULL");
+       SettingPrivacy *ad = (SettingPrivacy *)data;
+
+       int status = vconf_keynode_get_int(key);
+       char *vconf_name = vconf_keynode_get_name(key);
+
+       if (!safeStrCmp(vconf_name, VCONFKEY_LOCATION_USE_MY_LOCATION)) {
+               SETTING_TRACE("status: %d", status);
+               char *sub_desc = setting_location_is_enabled(data);
+               ad->location_service->sub_desc = strdup(sub_desc);
+               elm_object_item_data_set(ad->location_service->item,
+                               ad->location_service);
+               elm_genlist_item_update(ad->location_service->item);
+       } else {
+               SETTING_TRACE_ERROR("vconf_name is error");
+       }
+}
+
+char *setting_location_is_enabled(void *data)
+{
+       SETTING_TRACE_BEGIN;
+
+#if 0
+       bool is_enabled = FALSE;
+       int ret = location_manager_is_enabled_method(LOCATIONS_METHOD_HYBRID,
+                       &is_enabled);
+       SETTING_TRACE("hybrid: %d, ", is_enabled);
+
+       if (true == is_enabled)
+       return KeyStr_On;
+       else if (false == is_enabled)
+       return KeyStr_Off;
+       else
+       return SETTING_VCONF_ERR_RETURN_STR_NULL;
+#else
+       int is_enabled = -1;
+       if (0 != vconf_get_int(VCONFKEY_LOCATION_USE_MY_LOCATION, &is_enabled))
+               SETTING_TRACE_ERROR("Fail to get vconf");
+
+       if (1 == is_enabled)
+               return KeyStr_On;
+       else if (0 == is_enabled)
+               return KeyStr_Off;
+       else
+               return KeyStr_Off;
+       /* @todo : need to check and modify - old return was
+        * KeyStr_OffSETTING_VCONF_ERR_RETURN_STR_NULL */
+#endif
+}
+
+/**************************************************
+ * @brief create main view genlist items
+ * @param data application data
+ * @return FALSE for call it once and then destory the timer, TRUE for always
+ * call it when the timer is reached.
+ **************************************************/
+int _generate_genlist(SettingPrivacy *ad)
+{
+       SETTING_TRACE_BEGIN;
+       /* error check */
+       retv_if(!ad, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
+
+       Evas_Object *scroller = ad->md.genlist;
+
+       char *sub_desc = setting_location_is_enabled(ad);
+
+       ad->location_service = setting_create_Gendial_field_def(scroller,
+                       &(ad->itc_2text_2),
+                       _mouse_up_Gendial_list_cb,
+                       ad, SWALLOW_Type_INVALID,
+                       NULL, NULL, 0,
+                       KeyStr_LocationService, sub_desc, NULL);
+       if (ad->location_service) {
+               ad->location_service->sub_desc = strdup(sub_desc);
+               ad->location_service->userdata = ad;
+       } else {
+               SETTING_TRACE_ERROR("ad->location_service is NULL");
+       }
+
+       /* Privacy */
+       setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
+                       _mouse_up_Gendial_list_cb,
+                       ad, SWALLOW_Type_INVALID,
+                       NULL, NULL, 0,
+                       KeyStr_Privacy, NULL, NULL);
+
+       /* ADs */
+       setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
+                       _mouse_up_Gendial_list_cb,
+                       ad, SWALLOW_Type_INVALID,
+                       NULL, NULL, 0,
+                       KeyStr_ADs, NULL, NULL);
+
+       SETTING_TRACE_END;
+       return SETTING_RETURN_SUCCESS;
+}
+
+/***************************************************
+ *
+ * basic func
+ *
+ ***************************************************/
+static int _view_create(void *cb)
+{
+       SETTING_TRACE_BEGIN;
+       int ret;
+       SettingPrivacy *ad = (SettingPrivacy *)cb;
+       retv_if(!ad, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
+
+       ret = view_init(&ad->md, _("IDS_ST_HEADER_PRIVACY_AND_SAFETY_ABB"));
+       if (ret != SETTING_RETURN_SUCCESS)
+               return ret;
+
+       elm_object_style_set(ad->md.genlist, "dialogue");
+       setting_add_back_button(&ad->md, _cancel_cb, ad);
+
+       _generate_genlist(ad);
+
+       ret = vconf_notify_key_changed(VCONFKEY_LOCATION_USE_MY_LOCATION,
+                       _vconf_changed_cb, ad);
+       if (ret != 0)
+               SETTING_TRACE_ERROR("call vconf_notify_key_changed failed");
+       else
+               SETTING_TRACE_ERROR("call vconf_notify_key_changed succeeded");
+
+       setting_view_privacy_main.is_create = 1;
+       SETTING_TRACE_END;
+       return SETTING_RETURN_SUCCESS;
+}
+
+static int _view_destroy(void *cb)
+{
+       SETTING_TRACE_BEGIN;
+       /* error check */
+       retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
+       retv_if(!(setting_view_privacy_main.is_create),
+                       SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
+
+       SettingPrivacy *ad = (SettingPrivacy *)cb;
+
+       int ret = vconf_ignore_key_changed(VCONFKEY_LOCATION_USE_MY_LOCATION,
+                       _vconf_changed_cb);
+       if (ret != 0) {
+               SETTING_TRACE_ERROR(
+                               " >>> call vconf_ignore_key_changed failed");
+       } else {
+               SETTING_TRACE_ERROR(
+                               " >>> call vconf_ignore_key_changed succeeded");
+       }
+
+       if (ad->md.naviframe != NULL) {
+               evas_object_del(ad->md.naviframe);
+               ad->md.naviframe = NULL;
+       }
+
+       setting_view_privacy_main.is_create = 0;
+
+       SETTING_TRACE_END;
+       return SETTING_RETURN_SUCCESS;
+}
+
+static int _view_update(void *cb)
+{
+       SETTING_TRACE_BEGIN;
+       return SETTING_RETURN_SUCCESS;
+}
+
+static int _view_cleanup(void *cb)
+{
+       SETTING_TRACE_BEGIN;
+       return SETTING_RETURN_SUCCESS;
+}
diff --git a/setting-privacy/src/setting-privacy.c b/setting-privacy/src/setting-privacy.c
new file mode 100755 (executable)
index 0000000..2c4e836
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * setting
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Contact: MyoungJune Park <mj2004.park@samsung.com>
+ *
+ * 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 "setting-privacy.h"
+
+#define SETTING_PRIVACY_PACKAGE_NAME "org.tizen.setting-privacy"
+
+bool on_app_create(void *priv)
+{
+       SETTING_TRACE_BEGIN;
+       SettingPrivacy *ad = priv;
+       retv_if(!ad, NULL);
+
+       if (app_init(&ad->md, SETTING_PRIVACY_PACKAGE_NAME)
+                       != SETTING_RETURN_SUCCESS) {
+               SETTING_TRACE_ERROR("Cannot initialize application");
+               return false;
+       }
+
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+
+       /* register view node table */
+       setting_view_node_table_intialize();
+       setting_view_node_table_register(&setting_view_privacy_main,
+                       NULL);
+
+       /*      creating a view. */
+       setting_create_Gendial_itc(SETTING_GENLIST_2LINE_STYLE,
+                       &(ad->itc_2text_2));
+       setting_create_Gendial_itc(SETTING_GENLIST_ICON_1LINE_STYLE,
+                       &(ad->itc_1text));
+
+       setting_view_node_set_cur_view(&setting_view_privacy_main);
+       setting_view_create(&setting_view_privacy_main, (void *)ad);
+
+       return true;
+}
+
+static void on_app_pause(void *data)
+{
+       SETTING_TRACE_BEGIN;
+}
+
+static void on_app_control(app_control_h service, void *data)
+{
+       SETTING_TRACE_BEGIN;
+       SettingPrivacy *ad = data;
+       evas_object_show(ad->md.window);
+
+}
+
+static void on_app_resume(void *priv)
+{
+       SETTING_TRACE_BEGIN;
+       char *sub_desc;
+       SettingPrivacy *ad = priv;
+       ret_if(!priv);
+
+       setting_view_create(&setting_view_privacy_main, (void *)ad);
+
+       if (ad->location_service) {
+               sub_desc = setting_location_is_enabled(priv);
+               ad->location_service->sub_desc = strdup(sub_desc);
+               elm_object_item_data_set(ad->location_service->item,
+                               ad->location_service);
+               elm_genlist_item_update(ad->location_service->item);
+       }
+
+       SETTING_TRACE_END;
+}
+
+static void on_app_terminate(void *priv)
+{
+       SETTING_TRACE_BEGIN;
+       SettingPrivacy *ad = priv;
+
+       /* called when this shared gadget is terminated. similar with
+        * app_exit */
+       setting_view_destroy(&setting_view_privacy_main, ad);
+
+       SETTING_TRACE_END;
+}
+
+static void _lang_changed(app_event_info_h event_info, void *data)
+{
+       char *lang = NULL;
+       if (app_event_get_language(event_info, &lang) == APP_ERROR_NONE) {
+               SETTING_TRACE_DEBUG("Setting - language is changed : %s", lang);
+               elm_language_set(lang);
+               elm_config_all_flush();
+               free(lang);
+       } else {
+               SETTING_TRACE_ERROR("Cannot get language from event_info");
+       }
+}
+
+EXPORT_PUBLIC
+int main(int argc, char *argv[])
+{
+       app_event_handler_h handlers[5] = {NULL, };
+       ui_app_lifecycle_callback_s ops = {
+               .create = on_app_create,
+               .app_control = on_app_control,
+               .pause = on_app_pause,
+               .resume = on_app_resume,
+               .terminate = on_app_terminate,
+       };
+       SettingPrivacy app_data;
+       ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY],
+                       APP_EVENT_LOW_MEMORY, NULL, NULL);
+       ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY],
+                       APP_EVENT_LOW_BATTERY, NULL, NULL);
+       ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED],
+                       APP_EVENT_LANGUAGE_CHANGED, _lang_changed, &app_data);
+       ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED],
+                       APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL);
+       ui_app_add_event_handler(
+                       &handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED],
+                       APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL);
+       memset(&app_data, 0x0, sizeof(app_data));
+       return ui_app_main(argc, argv, &ops, &app_data);
+}
+