Apply tfeature usage 68/125568/1
authorsinikang <sinikang@samsung.com>
Tue, 4 Apr 2017 02:40:13 +0000 (11:40 +0900)
committersinikang <sinikang@samsung.com>
Tue, 18 Apr 2017 04:46:30 +0000 (13:46 +0900)
Change-Id: Ie0a146aa849ebc3ebd960dda2ecb410c2eaabbde

inc/notifier_internal.h
inc/notifier_util.h
packaging/tel-plugin-ui_notifier.spec
src/notifier.c
src/notifier_internal.c
src/notifier_launcher.c
src/notifier_util.c

index b3bac24fa332685914a19f54874a72748a3f857c..4bbde16627c639e007eae1414ac5131ba5947782 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <glib.h>
 #include <gio/gio.h>
+#include <tfeature.h>
 
 ////////////////////// SIM //////////////////////////
 #define IPC_MSG_SIM_NOT_PRESENTED                                      "SimNotPresented"
index 4fd6e97b83226abbdeb44ef23a0a942ba1358430..68929aabd835518236d22f83d5827bafbb2f13c9 100644 (file)
@@ -27,4 +27,4 @@
 
 void ui_notifier_lock_sleep(void);
 void ui_notifier_unlock_sleep(void);
-float ui_notifier_check_uptime();
+float ui_notifier_check_uptime();
\ No newline at end of file
index 8ad69b2b657531c29ff9fa5d85013b3213540427..1cae15335a6d7e3c97d2059e1e522c942c37d5f0 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 2
+%define patchlevel 3
 
 Name:           tel-plugin-ui_notifier
 Version:        %{major}.%{minor}.%{patchlevel}
index 1f263c932d426de17667e2c364ea94b5ed7fca5d..261fcd0443c71e8578ed4eb20f919e1836ed3444 100644 (file)
@@ -226,8 +226,8 @@ static void _check_net_roaming_data_allowed(ui_noti_data *ud, int roaming_status
 
 static void _check_net_manual_selection_no_svc(ui_noti_data *ud, enum telephony_network_service_type svc_type, sim_slot_id id)
 {
-       //if (!tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK))
-       //      return;
+       if (!tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK))
+               return;
 
        if (!ud->manual_plmn[id])
                return;
@@ -412,8 +412,7 @@ static void _process_flight_mode_state(TcorePlugin *p, gboolean new_mode)
        } while (0);
        ud->flight_mode = new_mode;
 
-       //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
-       if (1) {
+       if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
                if (ud->flight_mode) {
                        dbg("Flight mode on. stop checking manual plmn");
                        for (id = 0; id < ud->modems_count; id++) {
@@ -436,13 +435,13 @@ static gboolean on_prop_changed(CoreObject *co, const void *event_info,   void *us
        GSList *key = (GSList *)event_info;
 
        if (CORE_OBJECT_KEY_FIND(key, PROP_NET_MANUAL_PLMN)) {
-               //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
+               if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
                        _handle_prop_net_manual_plmn((TcorePlugin *)user_data, co);
-               //}
+               }
        } else if (CORE_OBJECT_KEY_FIND(key, PROP_NET_MANUAL_SELECTION_STATUS)) {
-               //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
+               if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
                        _handle_prop_net_manual_selection_status((TcorePlugin *)user_data, co);
-               //}
+               }
        } else if (CORE_OBJECT_KEY_FIND(key, PROP_NET_NITZ_TIMEZONE)) {
                _handle_prop_net_nitz_timezone((TcorePlugin *)user_data, co);
        }
@@ -529,8 +528,7 @@ static void on_hook_nitz_gmt_change(keynode_t* node, void* user_data)
                if (audo_update == FALSE)
                        return;
 
-               //if (tfeature_is_supported(TFEATURE_UI_NITZ_TIME_UPDATE_POPUP)) {
-               if (1) {
+               if (tfeature_is_supported(TFEATURE_UI_NITZ_TIME_UPDATE_POPUP)) {
                        info("Launch NITZ Time Update popup (Only for First NITZ)");
                        launch_telephony_popup(IPC_MSG_DISPLAY_NITZ_TIME_UPDATE, "", ud);
                }
@@ -549,11 +547,11 @@ static void on_power_saving_mode_changed(keynode_t* node, void* user_data)
 
        vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &ud->psmode);
 
-       //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
+       if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
                for (id = 0; id < ud->modems_count; id++) {
                        _check_net_manual_selection_no_svc_current(ud, id);
                }
-       //}
+       }
 }
 
 static enum tcore_hook_return on_hook_sim_status(Server *s, CoreObject *source,
@@ -609,9 +607,9 @@ static enum tcore_hook_return on_hook_sim_status(Server *s, CoreObject *source,
 #ifdef TIZEN_FEATURE_SHOW_NO_SIM_ONGOING_NOTI
                        launch_telephony_popup(IPC_MSG_SIM_NOT_PRESENTED, "", ud);
 #endif
-                       //if (tfeature_is_supported(TFEATURE_UI_SIM_RAISE_INVALID_SIM_POPUP)) {
+                       if (tfeature_is_supported(TFEATURE_UI_SIM_RAISE_INVALID_SIM_POPUP)) {
                                launch_telephony_popup(IPC_MSG_SIM_CARD_ERROR, "", ud);
-                       //}
+                       }
                }
                break;
        case SIM_STATUS_CARD_CRASHED:
@@ -619,8 +617,7 @@ static enum tcore_hook_return on_hook_sim_status(Server *s, CoreObject *source,
 #ifdef TIZEN_FEATURE_SHOW_NO_SIM_ONGOING_NOTI
                launch_telephony_popup(IPC_MSG_SIM_NOT_PRESENTED, "", ud);
 #endif
-               //if (tfeature_is_supported(TFEATURE_UI_SIM_RAISE_INVALID_SIM_POPUP)) {
-               if (1) {
+               if (tfeature_is_supported(TFEATURE_UI_SIM_RAISE_INVALID_SIM_POPUP)) {
                        launch_telephony_popup(IPC_MSG_SIM_CARD_CRASHED, "", ud);
                } else {
                        launch_telephony_popup(IPC_MSG_SIM_CARD_REMOVED, "", ud);
@@ -638,12 +635,9 @@ static enum tcore_hook_return on_hook_sim_status(Server *s, CoreObject *source,
                launch_telephony_popup(IPC_MSG_SIM_CARD_REMOVED, "", ud);
                break;
        case SIM_STATUS_INIT_COMPLETED:
-               //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
+               if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
                        _check_net_manual_selection_no_svc_current(ud, id);
-               //}
-               //if (tfeature_is_supported(TFEATURE_FUNCTION_CHECK_ACTIVATED_SIM)) {
-               //      _check_sim_ota_status();
-               //}
+               }
                break;
        case SIM_STATUS_PIN_REQUIRED:
        case SIM_STATUS_PUK_REQUIRED:
index 1edc92c72fd564217f4c5668b73af6b48f025352..bc2573b0cb5b95bc7e071755e50e8cd8c56b7107 100644 (file)
@@ -140,9 +140,7 @@ void launch_no_svc_with_manual_plmn_popup(ui_noti_data *ud, sim_slot_id id)
        manual_plmn_data *cb_data = NULL;
        const char *value = NULL;
 
-       //tempporaily modify for build
-       //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
-       if (1) {
+       if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
                unsigned int timeout = NO_SVC_WAITING_TIMEOUT;
                cancel_no_svc_with_manual_plmn_popup(ud, id);
                cb_data = calloc(sizeof(manual_plmn_data), 1);
index 76a03130f7211bdd40c3accce70437c19ba994a4..2b09996a70439538b07c377825990191e080fbc0 100644 (file)
@@ -85,14 +85,11 @@ static gpointer __launch_setup_ota_internal(gpointer data)
 static gpointer __launch_telephony_popup_internal(gpointer data)
 {
        struct __telephony_popup_payload_t *payload = data;
-       unsigned short retry_count = 0;
        bundle *kb;
        int ret;
 
        info("request telephony_syspopup ('%s', '%s')",
                payload->message, payload->param);
-RETRY:
-
        kb = bundle_create();
        if (kb == NULL) {
                err("Fail to create bundle");
@@ -110,12 +107,8 @@ RETRY:
        info("Request sent to launch %s", AUL_NAME);
        ret = aul_launch_app_for_uid(AUL_NAME, kb, GLOBAL_USER);
        bundle_free(kb);
-
-       if (ret < 0 && retry_count < 5) {
-               err("fail to launch (%d). Retry count [%d]", ret, retry_count);
-               retry_count++;
-               g_usleep(G_USEC_PER_SEC * 1);
-               goto RETRY;
+       if (ret < 0) {
+               err("fail to launch %s (%d)", AUL_NAME, ret);
        } else {
                info("success.('%s', '%s')", payload->message, payload->param);
        }
index fe15c9c0a68bbeda7f09f6d449f4ecbb54b3b00c..db813a8ed41536bfa7a7cb89b0cc536118c8c334 100644 (file)
@@ -35,8 +35,7 @@ void ui_notifier_lock_sleep(void)
 
 void ui_notifier_unlock_sleep(void)
 {
-       int ret = 0;
-       device_power_release_lock(POWER_LOCK_CPU);
+       int ret = device_power_release_lock(POWER_LOCK_CPU);
        if (ret < 0)
                err("ret : (0x%x)", ret);
 }