Revert "Remove the unused function" 50/89950/1
authorShinhui Kang <sinikang@samsung.com>
Wed, 28 Sep 2016 00:51:59 +0000 (17:51 -0700)
committerShinhui Kang <sinikang@samsung.com>
Wed, 28 Sep 2016 00:51:59 +0000 (17:51 -0700)
This reverts commit fe456fb052c935c944db7b52384ef790f8bcf05e.

Change-Id: I3857edd314866b9e20b990ad1f30ca5afdc58289

callmgr-popup/include/callmgr-popup-vconf.h
callmgr-popup/src/callmgr-popup-vconf.c
callmgr-popup/src/callmgr-popup-widget.c
common/include/callmgr-vconf.h
common/src/callmgr-vconf.c
packaging/call-manager.spec [changed mode: 0755->0644]
service/src/callmgr-core.c

index c62ce30..451ffd4 100644 (file)
@@ -23,6 +23,7 @@
 #include "callmgr-popup-common.h"
 
 gboolean _callmgr_popup_is_idle_lock(void);
+gboolean _callmgr_popup_is_pw_lock(void);
 gboolean _callmgr_popup_is_flight_mode(void);
 gboolean _callmgr_popup_is_fm_lock(void);
 
index 1726f05..676924f 100644 (file)
@@ -39,6 +39,24 @@ gboolean _callmgr_popup_is_idle_lock(void)
        }
 }
 
+gboolean _callmgr_popup_is_pw_lock(void)
+{
+       int pwlock_state = -1;
+
+       if (vconf_get_int(VCONFKEY_PWLOCK_STATE, &pwlock_state) < 0) {
+               WARN("vconf_get_int failed.");
+               return FALSE;
+       }
+
+       DBG("pwlock_state:[%d]", pwlock_state);
+       if ((pwlock_state == VCONFKEY_PWLOCK_BOOTING_LOCK)
+               || (pwlock_state == VCONFKEY_PWLOCK_RUNNING_LOCK)) {
+               return TRUE;
+       } else {
+               return FALSE;
+       }
+}
+
 gboolean _callmgr_popup_is_flight_mode(void)
 {
        gboolean flight_mode = FALSE;
index ac95b4d..fd85415 100644 (file)
@@ -95,6 +95,7 @@ Evas_Object *_callmgr_popup_create_win(void)
                }
 
                if ((_callmgr_popup_is_idle_lock())
+                       || (_callmgr_popup_is_pw_lock())
                        || (_callmgr_popup_is_fm_lock())) {
                        DBG("Set high window and block noti");
                        __callmgr_popup_set_win_level(eo, EINA_TRUE);
index 6de3a64..ba778fa 100644 (file)
@@ -43,6 +43,7 @@ typedef enum {
 } call_salescode_type;
 
 int _callmgr_vconf_is_security_lock(gboolean *is_security_lock);
+int _callmgr_vconf_is_pwlock(gboolean *is_pwlock);
 int _callmgr_vconf_is_low_battery(gboolean *is_low_battery);
 int _callmgr_vconf_is_sound_setting_enabled(gboolean *is_sound_enabled);
 int _callmgr_vconf_is_vibration_setting_enabled(gboolean *is_vibration_enabled);
index 3c463f9..c7d94f5 100644 (file)
@@ -52,6 +52,25 @@ int _callmgr_vconf_is_security_lock(gboolean *is_security_lock)
        return 0;
 }
 
+int _callmgr_vconf_is_pwlock(gboolean *is_pwlock)
+{
+       int pwlock_state = -1;
+       dbg("_callmgr_vconf_is_pwlock()");
+
+       if (vconf_get_int(VCONFKEY_PWLOCK_STATE, &pwlock_state) < 0) {
+               err("vconf_get_int failed.");
+               *is_pwlock = FALSE;
+               return -1;
+       }
+       info("pwlock_state:[%d]", pwlock_state);
+       if ((pwlock_state == VCONFKEY_PWLOCK_BOOTING_LOCK) || (pwlock_state == VCONFKEY_PWLOCK_RUNNING_LOCK)) {
+               *is_pwlock = TRUE;
+       } else {
+               *is_pwlock = FALSE;
+       }
+       return 0;
+}
+
 int _callmgr_vconf_is_low_battery(gboolean *is_low_battery)
 {
        dbg("_callmgr_vconf_is_low_battery()");
old mode 100755 (executable)
new mode 100644 (file)
index b631900..77434fb
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 74
+%define patchlevel 73
 %define ext_feature 0
 
 Name:           call-manager
index 7c4d7da..29e46ab 100644 (file)
@@ -2428,6 +2428,7 @@ int _callmgr_core_process_dial(callmgr_core_data_t *core_data, const char *numbe
        gboolean is_incall_ss = FALSE;
        gboolean is_ss = FALSE;
        gboolean is_number_valid = FALSE;
+       gboolean is_pwlock = FALSE;
        gboolean is_security_lock = FALSE;
        gboolean is_ui_visible = FALSE;
        cm_telepony_sim_slot_type_e active_sim = CM_TELEPHONY_SIM_UNKNOWN;
@@ -2446,9 +2447,10 @@ int _callmgr_core_process_dial(callmgr_core_data_t *core_data, const char *numbe
        CM_SAFE_FREE(extracted_call_num);
        CM_SAFE_FREE(extracted_dtmf_num);
 
+       _callmgr_vconf_is_pwlock(&is_pwlock);
        _callmgr_vconf_is_security_lock(&is_security_lock);
        _callmgr_vconf_is_ui_visible(&is_ui_visible);
-       if (is_security_lock) {
+       if (is_pwlock || is_security_lock) {
                if (is_ui_visible) {
                        warn("Callback case. Allow this operation!!");
                } else if (!is_emergency_call && !is_emergency_contact) {