4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #include <setting-common-data-type.h>
22 #include <setting-common-data-slp-setting.h>
23 #include <setting-common-draw-widget.h>
24 #include <setting-common-view.h>
26 #include <setting-security-main.h>
27 #include <setting-debug.h>
30 static int setting_security_main_create(void *cb);
31 static int setting_security_main_destroy(void *cb);
32 static int setting_security_main_update(void *cb);
33 static int setting_security_main_cleanup(void *cb);
35 setting_view setting_view_security_main = {
36 .create = setting_security_main_create,
37 .destroy = setting_security_main_destroy,
38 .update = setting_security_main_update,
39 .cleanup = setting_security_main_cleanup,
42 static void setting_security_main_click_softkey_back_cb(void *data,
46 static void setting_security_main_chk_btn_cb(void *data, Evas_Object *obj,
49 static void setting_security_main_mouse_up_Gendial_list_cb(void *data,
53 static void setting_security_main_update_view(void *data, char *keyStr);
54 static void setting_security_main_create_timer(void *data);
55 static Eina_Bool setting_security_main_timer_update_cb(void *data);
58 static void setting_security_main_check_vconf_value(void *data);
61 /* ***************************************************
65 ****************************************************/
67 static int setting_security_main_create(void *cb)
69 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
71 SettingSecurityUG *ad = (SettingSecurityUG *) cb;
73 Evas_Object *scroller;
79 gboolean b_status = FALSE;
82 /* add basic layout */
83 char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI];
84 snprintf(setBtnStr, sizeof(setBtnStr), "%s",
85 (char *)dgettext("sys_string", "IDS_COM_BODY_BACK"));
87 setting_create_layout_navi_bar_genlist(ad->win_main_layout,
89 _("IDS_ST_BODY_SECURITY"),
91 setting_security_main_click_softkey_back_cb,
95 Elm_Object_Item *item = NULL;
97 (void)setting_create_Gendial_field_titleItem(scroller,
99 "IDS_ST_HEADER_SCREEN_SECURITY", NULL);
101 #if SUPPORT_SCREEN_SECURITY
102 /* a. screen lock type */
103 ad->data_screen_lock_type = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
104 setting_security_main_mouse_up_Gendial_list_cb,ad,
105 SWALLOW_Type_INVALID,
107 0, Keystr_ScreenLockType, get_screen_lock_type_str(ad), NULL);
108 if(ad->data_screen_lock_type)
109 ad->data_screen_lock_type->userdata = ad;
111 /* b. lock screen options */
112 setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
113 setting_security_main_mouse_up_Gendial_list_cb,ad,
114 SWALLOW_Type_INVALID,
116 0, Keystr_LockScreenOptions, NULL, NULL);
118 setting_get_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, &value, &err);
121 ad->data_phone_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
122 setting_security_main_mouse_up_Gendial_list_cb, ad,
123 SWALLOW_Type_1TOGGLE,
125 value,"IDS_ST_BODY_PHONE_LOCK", NULL, setting_security_main_chk_btn_cb);
126 if(ad->data_phone_lk)
127 ad->data_phone_lk->userdata = ad;
129 SETTING_TRACE_ERROR("ad->data_phone_lk is null");
130 return SETTING_RETURN_FAIL;
132 setting_security_main_update_view(ad, "IDS_ST_BODY_PHONE_LOCK");
134 /* c. change password */
135 ad->data_cng_pw = setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
136 setting_security_main_mouse_up_Gendial_list_cb,ad,
137 SWALLOW_Type_INVALID,
139 0,"IDS_COM_POP_CHANGE_PASSWORD", NULL, NULL);
141 setting_get_bool_slp_key(BOOL_SLP_SETTING_SIMPLE_PASSWORD, &value, &err);
142 /* d. simple password */
143 ad->data_simple_pw= setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
144 setting_security_main_mouse_up_Gendial_list_cb, ad,
145 SWALLOW_Type_1TOGGLE,
147 value, "IDS_ST_BODY_SIMPLE_PASSWORD", NULL, setting_security_main_chk_btn_cb);
148 if(ad->data_simple_pw)
149 ad->data_simple_pw->userdata = ad;
151 SETTING_TRACE_ERROR("ad->data_simple_pw is null");
152 return SETTING_RETURN_FAIL;
155 /* @ for MDM test @ */
157 setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
158 setting_security_main_mouse_up_Gendial_list_cb,ad,
159 SWALLOW_Type_INVALID,
161 0,"MDM test", NULL, NULL);
163 setting_security_disable_items_for_mdm(ad);
167 (void)setting_create_Gendial_field_titleItem(scroller,
169 "Phone security", NULL);
171 #if SUPPORT_PARENTAL_MODE /* TBD */
172 /* b. parental mode */
173 ad->data_parental_md = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
174 setting_security_main_mouse_up_Gendial_list_cb, ad,
175 SWALLOW_Type_INVALID,
177 0,Keystr_ParentalMode, "Off"/*get_parental_mode_on_off_str(ad)*/, NULL);
178 ad->data_parental_md->userdata = ad;
181 item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
182 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
185 /* check whether binary is slp or not, for mobile tracker */
186 if(! is_slp_binary())
188 /* e. find my mobile */
189 ad->data_mb = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
190 setting_security_main_mouse_up_Gendial_list_cb, ad,
191 SWALLOW_Type_INVALID,
193 0,"IDS_ST_HEADER2_FIND_MY_MOBILE", get_find_my_mobile_on_off_str(ad), NULL);
195 ad->data_mb->userdata = ad;
197 SETTING_TRACE_ERROR("ad->data_mb is null");
198 return SETTING_RETURN_FAIL;
203 if(ad->handle && !isEmulBin())
205 /* check status of sim and tapi */
206 ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err);
207 tapi_ret = tel_check_modem_power_status(ad->handle, &b_status);
209 if ((tapi_ret == TAPI_API_SUCCESS) && (b_status == TAPI_PHONE_POWER_STATUS_ON) && (value == VCONFKEY_TELEPHONY_SIM_INSERTED))
212 item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
213 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
215 setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
216 setting_security_main_mouse_up_Gendial_list_cb,ad,
217 SWALLOW_Type_INVALID,
219 0,"SIM settings", NULL, NULL);
223 #if SUPPORT_ENCRYPTION
225 item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
226 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
228 /* device encryption */
229 ad->data_device_enc = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
230 setting_security_main_mouse_up_Gendial_list_cb, ad,
231 SWALLOW_Type_INVALID,
233 value,"IDS_ASEML_BODY_DEVICE_ENCRYPTION", NULL, NULL);
235 /* To do : add description of device encryption */
236 setting_create_Gendial_field_def(scroller, &(itc_multiline_text),
238 SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
239 NULL, NULL, 0, DEVICE_ENCRYPTION_DESC, NULL, NULL);
240 elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL),
241 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
244 ad->data_mmc_enc = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
245 setting_security_main_mouse_up_Gendial_list_cb, ad,
246 SWALLOW_Type_1TOGGLE,
248 value,"IDS_ASEML_BODY_MMC_ENCRYPTION", NULL, setting_security_main_chk_btn_cb);
253 setting_view_security_main.is_create = 1;
255 g_ad = (SettingSecurityUG *) malloc(sizeof(SettingSecurityUG) *1);
257 memcpy(g_ad, ad, sizeof(SettingSecurityUG));
259 vconf_notify_key_changed(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
260 setting_security_main_vconf_change_cb, ad);
261 vconf_notify_key_changed(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT,
262 setting_security_main_vconf_change_cb, ad);
264 setting_security_main_check_vconf_value(ad);
266 return SETTING_RETURN_SUCCESS;
269 static int setting_security_main_destroy(void *cb)
273 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
275 SettingSecurityUG *ad = (SettingSecurityUG *) cb;
277 if (ad->update_view_timer) {
278 ecore_timer_del(ad->update_view_timer);
279 ad->update_view_timer = NULL;
282 vconf_ignore_key_changed(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
283 setting_security_main_vconf_change_cb);
284 vconf_ignore_key_changed(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT,
285 setting_security_main_vconf_change_cb);
286 if (ad->ly_main != NULL) {
287 evas_object_del(ad->ly_main);
294 setting_view_security_main.is_create = 0;
296 return SETTING_RETURN_SUCCESS;
299 static int setting_security_main_update(void *cb)
303 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
305 SettingSecurityUG *ad = (SettingSecurityUG *) cb;
307 evas_object_show(ad->ly_main);
309 return SETTING_RETURN_SUCCESS;
312 static int setting_security_main_cleanup(void *cb)
316 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
318 return SETTING_RETURN_SUCCESS;
321 /* ***************************************************
325 ****************************************************/
327 setting_security_main_click_softkey_back_cb(void *data, Evas_Object *obj,
332 retm_if(data == NULL, "[Setting > Security] Data parameter is NULL");
334 SettingSecurityUG *ad = (SettingSecurityUG *) data;
336 /* Send destroy request */
337 ug_destroy_me(ad->ug);
340 int _handle_sim_exception(void *data, int sim_status)
342 retv_if(data == NULL, SETTING_RETURN_FAIL);
344 SettingSecurityUG *ad = (SettingSecurityUG *) data;
346 switch (sim_status) {
347 case VCONFKEY_TELEPHONY_SIM_INSERTED:
350 case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT:
352 setting_create_simple_popup(NULL, ad->win_get,
353 NULL, _("IDS_ST_SECURITY_BODY_NOIMSI"));
355 ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s",
356 SETTING_FONT_RED, sim_status, SETTING_FONT_BLACK);
357 return SETTING_RETURN_FAIL;
361 case VCONFKEY_TELEPHONY_SIM_CARD_ERROR:
362 case VCONFKEY_TELEPHONY_SIM_UNKNOWN:
364 setting_create_simple_popup(NULL, ad->win_get,
365 NULL, _("IDS_COM_BODY_INVALID_SIM_CARD"));
367 ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s",
368 SETTING_FONT_RED, sim_status, SETTING_FONT_BLACK);
369 return SETTING_RETURN_FAIL;
375 return SETTING_RETURN_SUCCESS;
379 void _draw_fdn_onoff_status(void *data, Evas_Object *check)
381 SETTING_TRACE_BEGIN; //("Fixed Dialing Number");
383 ret_if(data == NULL);
385 SettingSecurityUG *ad = (SettingSecurityUG *) data;
392 ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err);
394 ret = _handle_sim_exception(ad, value);
395 if(ret == SETTING_RETURN_FAIL)
398 int old_state = elm_check_state_get(check);
400 SETTING_TRACE("Current status of SIM Lock is ON");
401 ad->pw_type = SETTING_SEC_PW_FDN_MODE_OFF;
402 setting_security_create_password_sg(ad);
404 SETTING_TRACE("Current status of SIM Lock is OFF");
405 ad->pw_type = SETTING_SEC_PW_FDN_MODE_ON;
406 setting_security_create_password_sg(ad);
412 /* Check Btn Call Back : Phone Lock, SIm Lock, PIN Lock, FDN, */
414 setting_security_main_chk_btn_cb(void *data, Evas_Object *obj,
419 retm_if(data == NULL, "[Setting > Reset] Data parameter is NULL");
420 Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data;
421 SettingSecurityUG *ad = list_item->userdata;
423 list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */
425 // create password-ug
426 //setting_security_main_draw_onoff_status(ad, obj);
427 if (!safeStrCmp("IDS_ST_BODY_PHONE_LOCK", list_item->keyStr)) {
428 #if !SUPPORT_SCREEN_SECURITY
429 setting_check_onoff_status(list_item->eo_check, BOOL_SLP_SETTING_POWER_ON_LOCK); /* reset check state */
430 ad->pw_type = SETTING_SEC_PW_PHONE_LOCK;
431 setting_security_create_password_sg(ad);
433 }else if (!safeStrCmp("IDS_ST_BODY_SIMPLE_PASSWORD", list_item->keyStr)) {
434 setting_check_onoff_status(list_item->eo_check, BOOL_SLP_SETTING_SIMPLE_PASSWORD); /* reset check state */
435 ad->pw_type = SETTING_SEC_PW_SIMPLE_PASSWD;
436 setting_security_create_password_sg(ad);
443 #define SETTING_MDM_TEST_MENU_NAME_STR 65
444 /* @ for MDM test @ */
445 gboolean setting_security_create_password_sg_for_mdm(void *data)
448 retv_if(data == NULL, FALSE);
450 SettingSecurityUG *ad = (SettingSecurityUG *) data; /* ad is point to data */
453 SETTING_TRACE("Password UG is already loaded.");
457 char str[SETTING_MDM_TEST_MENU_NAME_STR] = { 0, };
458 safeCopyStr(str, "SETTING_PW_TYPE_MDM_CHANGE_PASSWORD", SETTING_MDM_TEST_MENU_NAME_STR-1);
460 struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
464 cbs->layout_cb = setting_security_layout_passwd_ug_cb;
465 cbs->result_cb = setting_security_result_password_ug_cb;
466 cbs->destroy_cb = setting_security_destroy_password_ug_cb;
467 cbs->priv = (void *)ad;
470 if (service_create(&svc)) {
475 service_add_extra_data(svc, "viewtype", str);
477 ad->ug_passwd = ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs);
478 if (NULL == ad->ug_passwd) { /* error handling */
479 evas_object_show(ad->ly_main);
482 service_destroy(svc);
490 setting_security_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj,
495 setting_retm_if(data == NULL, "Data parameter is NULL");
497 retm_if(event_info == NULL, "Invalid argument: event info is NULL");
498 Elm_Object_Item *item = (Elm_Object_Item *) event_info;
499 elm_genlist_item_selected_set(item, 0);
500 Setting_GenGroupItem_Data *list_item =
501 (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
503 SettingSecurityUG *ad = (SettingSecurityUG *) data;
505 SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
507 if (!safeStrCmp("IDS_ST_HEADER2_FIND_MY_MOBILE", list_item->keyStr)) {
508 setting_security_create_find_my_mobile_sg(ad, 0, NULL);
511 /* @ for MDM test @ */
512 else if(!safeStrCmp("MDM test", list_item->keyStr)) {
513 setting_security_create_password_sg_for_mdm(ad);
516 #if SUPPORT_ENCRYPTION
517 else if(!safeStrCmp("IDS_ASEML_BODY_DEVICE_ENCRYPTION", list_item->keyStr))
519 /* To do : create device encryption view */
520 setting_create_simple_popup(NULL, ad->win_get,
521 NULL, "NOT IMPLEMENTED YET");
524 #if SUPPORT_SCREEN_SECURITY
525 else if(!safeStrCmp(Keystr_ScreenLockType, list_item->keyStr)) {
526 /* To do : check current password, if spw or pw set. */
527 int lock_type = SETTING_SCREEN_LOCK_TYPE_SWIPE; //elm_radio_value_get(ad->lock_type_rd);
528 vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &lock_type);
530 if(lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD
531 || lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD)
533 ad->pw_type = SETTING_SEC_PW_ENTER_LOCK_TYPE;
534 setting_security_create_password_sg(ad);
538 setting_view_change(&setting_view_security_main, &setting_view_security_screen_lock_type, ad);
541 else if(!safeStrCmp(Keystr_LockScreenOptions, list_item->keyStr)) {
542 setting_security_create_lockscreen_options_sg(ad);
545 #if SUPPORT_PARENTAL_MODE
546 else if(!safeStrCmp(Keystr_ParentalMode, list_item->keyStr)) {
547 /* to do : call parental mode ug */
548 setting_create_simple_popup(NULL, ad->win_get,
549 NULL, "NOT IMPLEMENTED YET");
552 else if(!safeStrCmp("SIM settings", list_item->keyStr)) {
553 setting_view_change(&setting_view_security_main, &setting_view_security_sim_settings, ad);
558 static void setting_security_main_update_view(void *data, char *keyStr)
562 SettingSecurityUG *ad = (SettingSecurityUG *) data;
564 Elm_Object_Item *list_item = NULL;
565 setting_int_slp_list vconf_type_int;
566 setting_str_slp_list vconf_type_str;
568 int block_seconds = 30;
570 if (!safeStrCmp(keyStr, "IDS_ST_BODY_PHONE_LOCK")) {
571 vconf_type_int = INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT;
572 vconf_type_str = STR_SLP_SETTING_PHONE_LOCK_TIMESTAMP;
573 attemps_max = PHONE_LOCK_ATTEMPS_MAX;
574 block_seconds = PHONE_LOCK_BLOCK_SECONDS;
575 ret_if(!ad->data_phone_lk);
576 list_item = ad->data_phone_lk->item;
577 } else if (!safeStrCmp(keyStr, "IDS_ST_BODY_SIM_LOCK")) {
578 vconf_type_int = INT_SLP_SETTING_SIM_LOCK_ATTEMPTS_LEFT;
579 vconf_type_str = STR_SLP_SETTING_SIM_LOCK_TIMESTAMP;
580 attemps_max = SIM_LOCK_ATTEMPS_MAX;
581 block_seconds = SIM_LOCK_BLOCK_SECONDS;
582 ret_if(!ad->data_sim_lk);
583 list_item = ad->data_sim_lk->item;
589 int err = SETTING_RETURN_SUCCESS;
590 setting_get_int_slp_key(vconf_type_int, &value, &err);
591 setting_retm_if(err == SETTING_RETURN_FAIL,
592 "[Error] get the value of vconf fail.");
595 char last_lock_timestamp[LOCK_TIMESTAMP_LEN] = { 0, };
596 setting_get_string_slp_key(vconf_type_str, last_lock_timestamp,
598 setting_retm_if(err == SETTING_RETURN_FAIL,
599 "[Error] get the value of vconf fail.");
601 if (!isEmptyStr(last_lock_timestamp)) {
602 time_t cur_time = time(NULL);
603 time_t last_lock_time;
606 last_lock_time = strtol(last_lock_timestamp, &endptr, 10);
607 setting_retm_if(errno == ERANGE, "strtol fail");
609 if ((cur_time - last_lock_time) < block_seconds) {
610 ret_if(elm_object_item_disabled_get(list_item));
611 setting_disable_genlist_item(list_item);
613 setting_set_int_slp_key(vconf_type_int,
615 setting_retm_if(err == SETTING_RETURN_FAIL,
616 "[Error] set the value of vconf fail.");
618 ret_if(!elm_object_item_disabled_get(list_item));
619 setting_enable_genlist_item(list_item);
625 static void setting_security_main_create_timer(void *data)
629 SettingSecurityUG *ad = (SettingSecurityUG *) data;
631 if (ad->update_view_timer) {
634 ad->update_view_timer = ecore_timer_add(2, (Ecore_Task_Cb)
635 setting_security_main_timer_update_cb,
639 static Eina_Bool setting_security_main_timer_update_cb(void *data)
641 retv_if(!data, EINA_TRUE);
642 SettingSecurityUG *ad = (SettingSecurityUG *) data;
644 //setting_security_main_update_view(ad, "IDS_ST_BODY_PHONE_LOCK");
645 setting_security_main_update_view(ad, "IDS_ST_BODY_SIM_LOCK");
650 void setting_security_main_vconf_change_cb(keynode_t *key, void *data)
653 ret_if(NULL == data);
654 SettingSecurityUG *ad = (SettingSecurityUG *) data;
656 if(ad->data_screen_lock_type)
658 str = (char*)g_strdup(get_screen_lock_type_str(ad));
660 str = g_strdup("err");
662 ad->data_screen_lock_type->sub_desc = str;
663 elm_genlist_item_update(ad->data_screen_lock_type->item);
666 setting_security_main_check_vconf_value(ad);
669 static void setting_security_main_check_vconf_value(void *data)
672 ret_if(NULL == data);
673 //SettingSecurityUG *ad = (SettingSecurityUG *) data;
675 setting_int_slp_list phone_lock_attemps_left =
676 INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT;
677 setting_int_slp_list sim_lock_attemps_left =
678 INT_SLP_SETTING_SIM_LOCK_ATTEMPTS_LEFT;
680 int phone_lock_value = -1;
681 int sim_lock_value = -1;
682 int err = SETTING_RETURN_SUCCESS;
684 setting_get_int_slp_key(phone_lock_attemps_left, &phone_lock_value,
686 setting_retm_if(err == SETTING_RETURN_FAIL,
687 "[Error] get the value of vconf fail.");
689 setting_get_int_slp_key(sim_lock_attemps_left, &sim_lock_value, &err);
690 setting_retm_if(err == SETTING_RETURN_FAIL,
691 "[Error] get the value of vconf fail.");
693 if (phone_lock_value == 0 || sim_lock_value == 0) {
694 setting_security_main_create_timer(ad);
696 SETTING_TRACE("don't need create timer");
697 if (ad->update_view_timer) {
698 ecore_timer_del(ad->update_view_timer);
699 ad->update_view_timer = NULL;