Fix coding rule error 66/125566/1
authorsinikang <sinikang@samsung.com>
Thu, 23 Mar 2017 08:03:48 +0000 (17:03 +0900)
committersinikang <sinikang@samsung.com>
Tue, 18 Apr 2017 04:44:12 +0000 (13:44 +0900)
Change-Id: I2708280c884ab54709ae12797bb65a00624191ee

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

index 68929aabd835518236d22f83d5827bafbb2f13c9..4fd6e97b83226abbdeb44ef23a0a942ba1358430 100644 (file)
@@ -27,4 +27,4 @@
 
 void ui_notifier_lock_sleep(void);
 void ui_notifier_unlock_sleep(void);
-float ui_notifier_check_uptime();
\ No newline at end of file
+float ui_notifier_check_uptime();
index c41d5a75abb07c29658d586b64f043dd50d5c782..f5b2a40db5fa52e318376f8393a799210155a8e0 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 0
+%define patchlevel 1
 
 Name:           tel-plugin-ui_notifier
 Version:        %{major}.%{minor}.%{patchlevel}
index c006f2a6ff45ebfad18c91bbbfa4664d5514bda8..268b17ca6b2232b1712d3e35d01c170286faa35e 100644 (file)
@@ -48,8 +48,7 @@ static void on_unload(TcorePlugin *plugin)
        ui_notifier_deinit(plugin);
 }
 
-EXPORT_API struct tcore_plugin_define_desc plugin_define_desc =
-{
+EXPORT_API struct tcore_plugin_define_desc plugin_define_desc = {
        .name = "UI_NOTIFIER",
        .priority = TCORE_PLUGIN_PRIORITY_LOW,
        .version = PLUGIN_VERSION,
index 86da6e8b34e9a7108115a375a9dcabdc54a5f00d..1f263c932d426de17667e2c364ea94b5ed7fca5d 100644 (file)
@@ -39,7 +39,7 @@
 #define VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN_SIM1 VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN
 #define VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN_SIM2 VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN
 
-static gboolean on_prop_changed (CoreObject *co, const void *event_info, void *user_data);
+static gboolean on_prop_changed(CoreObject *co, const void *event_info, void *user_data);
 
 static gboolean _is_in_service(enum telephony_network_service_type service_type)
 {
@@ -63,7 +63,7 @@ static gboolean __is_file_exist(char *path)
                return FALSE;
 
        fp = fopen(path, "r");
-       if(fp) {
+       if (fp) {
                info("[%s] exist", path);
                fclose(fp);
                ret = TRUE;
@@ -88,11 +88,11 @@ sim_slot_id __get_sim_slotid(CoreObject *source)
        if (!cp_name) {
                return SLOT_ID_MAX;
        }
-       if(g_str_has_suffix(cp_name , "0")){
+       if (g_str_has_suffix(cp_name , "0")) {
                return SLOT_ID_PRIMARY;
-       } else if (g_str_has_suffix(cp_name , "1")){
+       } else if (g_str_has_suffix(cp_name , "1")) {
                return SLOT_ID_SECONDARY;
-       } else if(g_str_has_suffix(cp_name , "2")){
+       } else if (g_str_has_suffix(cp_name , "2")) {
                return SLOT_ID_TERTIARY;
        } else {
                return SLOT_ID_MAX;
@@ -115,7 +115,7 @@ static gboolean __all_sims_absent(ui_noti_data *ud)
        if (sim_not_present_count == ud->modems_count) {
                dbg("Both SIMS are not present");
                return TRUE;
-        }
+       }
        return FALSE;
 }
 
@@ -142,10 +142,10 @@ static void __update_first_bootup_info(TcorePlugin *p, sim_slot_id id, enum tel_
 static void _check_net_prop_event_registered(ui_noti_data *ud, CoreObject *co_network, TcorePlugin *p, sim_slot_id id)
 {
        if (ud->prop_event_registered[id] == FALSE) {
-               dbg ("event register for id %d", id);
+               dbg("event register for id %d", id);
                ud->prop_event_registered[id] = TRUE;
                ud->co_network[id] = co_network;
-               tcore_object_add_callback (co_network, CORE_OBJECT_EVENT_PROPERTY_CHANGED,
+               tcore_object_add_callback(co_network, CORE_OBJECT_EVENT_PROPERTY_CHANGED,
                                on_prop_changed, p);
        }
 }
@@ -185,7 +185,8 @@ static void _check_net_roaming_data_allowed_with_slot_id(ui_noti_data *ud, int r
        }
 }
 
-static void on_default_data_slot_changed(keynode_t* node, void* user_data) {
+static void on_default_data_slot_changed(keynode_t* node, void* user_data)
+{
        TcorePlugin *p = user_data;
        ui_noti_data *ud = tcore_plugin_ref_user_data(p);
 
@@ -233,48 +234,48 @@ static void _check_net_manual_selection_no_svc(ui_noti_data *ud, enum telephony_
 
 
        if (ud->sim_status[id] != SIM_STATUS_INIT_COMPLETED) {
-               info ("We don't need to check manual_selection with sim_status(%d)", ud->sim_status[id]);
+               info("We don't need to check manual_selection with sim_status(%d)", ud->sim_status[id]);
                return;
        }
 
        if (ud->flight_mode) {
-               info ("We don't need to check manual_selection with flight mode(%d)", ud->flight_mode);
+               info("We don't need to check manual_selection with flight mode(%d)", ud->flight_mode);
                return;
        }
        if (ud->psmode) {
-               info ("We don't need to check manual_selection with power saving mode(%d)", ud->psmode);
+               info("We don't need to check manual_selection with power saving mode(%d)", ud->psmode);
                return;
        }
 
        ud->svc_type[id] = svc_type;
-       dbg ("For slot(%d) service_type (%d) manual_plmn (%s)", id, ud->svc_type[id], ud->manual_plmn[id]?ud->manual_plmn[id]:"");
+       dbg("For slot(%d) service_type (%d) manual_plmn (%s)", id, ud->svc_type[id], ud->manual_plmn[id] ? ud->manual_plmn[id] : "");
 
        switch (ud->svc_type[id]) {
-               case NETWORK_SERVICE_TYPE_UNKNOWN:
-                       break;
-               case NETWORK_SERVICE_TYPE_NO_SERVICE:
-               case NETWORK_SERVICE_TYPE_EMERGENCY:
-               case NETWORK_SERVICE_TYPE_SEARCH:
-               {
-                       if (ud->manual_plmn[id]) {
-                               if (ud->manual_plmn_popup_required[id]) {
-                                       info ("manual selection (%s) exist and home screen launched. launch popup", ud->manual_plmn[id]);
-                                       launch_no_svc_with_manual_plmn_popup(ud, id);
-                                       ud->manual_plmn_popup_required[id] = FALSE;
-                               } else {
-                                       dbg ("popup is not required");
-                               }
+       case NETWORK_SERVICE_TYPE_UNKNOWN:
+               break;
+       case NETWORK_SERVICE_TYPE_NO_SERVICE:
+       case NETWORK_SERVICE_TYPE_EMERGENCY:
+       case NETWORK_SERVICE_TYPE_SEARCH:
+       {
+               if (ud->manual_plmn[id]) {
+                       if (ud->manual_plmn_popup_required[id]) {
+                               info("manual selection (%s) exist and home screen launched. launch popup", ud->manual_plmn[id]);
+                               launch_no_svc_with_manual_plmn_popup(ud, id);
+                               ud->manual_plmn_popup_required[id] = FALSE;
                        } else {
-                               dbg ("No manual plmn (Automatic). do nothing");
+                               dbg("popup is not required");
                        }
+               } else {
+                       dbg("No manual plmn (Automatic). do nothing");
                }
-               break;
-               default : {
-                       if (ud->manual_plmn[id]) {
-                               cancel_no_svc_with_manual_plmn_popup(ud, id);
-                       }
+       }
+       break;
+       default: {
+               if (ud->manual_plmn[id]) {
+                       cancel_no_svc_with_manual_plmn_popup(ud, id);
                }
-               break;
+       }
+       break;
        }
 }
 
@@ -297,10 +298,10 @@ static void _handle_prop_net_nitz_timezone(TcorePlugin *p, CoreObject *co)
                return;
        }
 
-       value = tcore_object_ref_property (co, PROP_NET_NITZ_TIMEZONE);
-       info ("Nitz Timezone Status = %s", value);
+       value = tcore_object_ref_property(co, PROP_NET_NITZ_TIMEZONE);
+       info("Nitz Timezone Status = %s", value);
 
-       if (g_strcmp0 (value, "user_selection_required") == 0) {
+       if (g_strcmp0(value, "user_selection_required") == 0) {
                launch_timezone_select_popup(ud);
        }
 }
@@ -317,21 +318,20 @@ static void _handle_prop_net_manual_selection_status(TcorePlugin *p, CoreObject
        }
 
        id = __get_sim_slotid(co);
-       value = tcore_object_ref_property (co, PROP_NET_MANUAL_SELECTION_STATUS);
-       info ("slot(%d), manual selection status = %s", id, value);
+       value = tcore_object_ref_property(co, PROP_NET_MANUAL_SELECTION_STATUS);
+       info("slot(%d), manual selection status = %s", id, value);
 
-       if (g_strcmp0 (value, "waiting") == 0) {
-               dbg ("Waiting for manual selection result");
+       if (g_strcmp0(value, "waiting") == 0) {
+               dbg("Waiting for manual selection result");
                cancel_no_svc_with_manual_plmn_popup(ud, id);
                ud->manual_plmn_popup_required[id] = FALSE;
-       }
-       else if ((g_strcmp0 (value, "failure") == 0)
-               || (g_strcmp0 (value, "success") == 0)) {
-               dbg ("manual selection done. Check service type");
+       } else if ((g_strcmp0(value, "failure") == 0)
+               || (g_strcmp0(value, "success") == 0)) {
+               dbg("manual selection done. Check service type");
                ud->manual_plmn_popup_required[id] = TRUE;
                _check_net_manual_selection_no_svc_current(ud, id);
        } else {
-               dbg ("Changed to Automatic.");
+               dbg("Changed to Automatic.");
                cancel_no_svc_with_manual_plmn_popup(ud, id);
                ud->manual_plmn_popup_required[id] = FALSE;
        }
@@ -349,8 +349,8 @@ static void _handle_prop_net_manual_plmn(TcorePlugin *p, CoreObject *co)
        }
 
        id = __get_sim_slotid(co);
-       manual_plmn = tcore_object_ref_property (co, PROP_NET_MANUAL_PLMN);
-       dbg ("property changed (value = %s) for slot(%d)", (manual_plmn?manual_plmn:"Null"), id);
+       manual_plmn = tcore_object_ref_property(co, PROP_NET_MANUAL_PLMN);
+       dbg("property changed (value = %s) for slot(%d)", (manual_plmn ? manual_plmn : "Null"), id);
 
        if (manual_plmn == NULL) {
                manual_plmn = "";
@@ -370,8 +370,8 @@ static void _handle_prop_net_manual_plmn(TcorePlugin *p, CoreObject *co)
                warn("Unsupported id(%d)", id);
                return;
        }
-       info ("For slot(%d) key Set to : [%s], manual_plmn:[%s], popup_required:[%d]",
-               id, manual_plmn, ud->manual_plmn[id]?ud->manual_plmn[id]:"Null", ud->manual_plmn_popup_required[id]);
+       info("For slot(%d) key Set to : [%s], manual_plmn:[%s], popup_required:[%d]",
+               id, manual_plmn, ud->manual_plmn[id] ? ud->manual_plmn[id] : "Null", ud->manual_plmn_popup_required[id]);
 
        _check_net_manual_selection_no_svc_current(ud, id);
 
@@ -413,7 +413,7 @@ static void _process_flight_mode_state(TcorePlugin *p, gboolean new_mode)
        ud->flight_mode = new_mode;
 
        //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
-       if(1) {
+       if (1) {
                if (ud->flight_mode) {
                        dbg("Flight mode on. stop checking manual plmn");
                        for (id = 0; id < ud->modems_count; id++) {
@@ -431,8 +431,7 @@ static void _process_flight_mode_state(TcorePlugin *p, gboolean new_mode)
 
 }
 
-static gboolean on_prop_changed (CoreObject *co, const void *event_info,
-               void *user_data)
+static gboolean on_prop_changed(CoreObject *co, const void *event_info,        void *user_data)
 {
        GSList *key = (GSList *)event_info;
 
@@ -440,13 +439,11 @@ static gboolean on_prop_changed (CoreObject *co, const void *event_info,
                //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)) {
+       } else if (CORE_OBJECT_KEY_FIND(key, PROP_NET_MANUAL_SELECTION_STATUS)) {
                //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)) {
+       } else if (CORE_OBJECT_KEY_FIND(key, PROP_NET_NITZ_TIMEZONE)) {
                _handle_prop_net_nitz_timezone((TcorePlugin *)user_data, co);
        }
 
@@ -459,15 +456,15 @@ static enum tcore_hook_return on_hook_network_plmn_change(Server *s, CoreObject
        ui_noti_data *ud;
        struct tnoti_network_change *info = data;
 
-       ud = tcore_plugin_ref_user_data (user_data);
+       ud = tcore_plugin_ref_user_data(user_data);
        if (!ud || !info || strlen(info->plmn) == 0) {
-               dbg ("Invalid Data");
+               dbg("Invalid Data");
                return TCORE_HOOK_RETURN_CONTINUE;
        }
 
        if ((ud->current_plmn && strncmp(info->plmn, ud->current_plmn, 3))
                || (!ud->current_plmn)) {
-               info("MCC change (%s) -> (%s)", ud->current_plmn?ud->current_plmn:"", info->plmn);
+               info("MCC change (%s) -> (%s)", ud->current_plmn ? ud->current_plmn : "", info->plmn);
                g_free(ud->current_plmn);
                ud->current_plmn = g_strdup(info->plmn);
        }
@@ -483,21 +480,21 @@ static enum tcore_hook_return on_hook_network_service_type_change(Server *s, Cor
        struct tnoti_network_registration_status *info = data;
        sim_slot_id id;
 
-       ud = tcore_plugin_ref_user_data (user_data);
+       ud = tcore_plugin_ref_user_data(user_data);
        if (!ud) {
-               err ("tcore_plugin_ref_user_data() is NULL");
+               err("tcore_plugin_ref_user_data() is NULL");
                return TCORE_HOOK_RETURN_CONTINUE;
        }
 
        if (!info) {
-               err ("tnoti_network_registration_status() is NULL");
+               err("tnoti_network_registration_status() is NULL");
                return TCORE_HOOK_RETURN_CONTINUE;
        }
 
        id = __get_sim_slotid(source);
        if (ud->sim_status[id] == SIM_STATUS_CARD_NOT_PRESENT ||
-               ud->sim_status[id]== SIM_STATUS_UNKNOWN) {
-               dbg ("No SIM or Unknown");
+               ud->sim_status[id] == SIM_STATUS_UNKNOWN) {
+               dbg("No SIM or Unknown");
                return TCORE_HOOK_RETURN_CONTINUE;
        }
 
@@ -518,7 +515,8 @@ static enum tcore_hook_return on_hook_network_service_type_change(Server *s, Cor
        return TCORE_HOOK_RETURN_CONTINUE;
 }
 
-static void on_hook_nitz_gmt_change(keynode_t* node, void* user_data) {
+static void on_hook_nitz_gmt_change(keynode_t* node, void* user_data)
+{
        TcorePlugin *p = user_data;
        ui_noti_data *ud = tcore_plugin_ref_user_data(p);
 
@@ -532,7 +530,7 @@ static void on_hook_nitz_gmt_change(keynode_t* node, void* user_data) {
                        return;
 
                //if (tfeature_is_supported(TFEATURE_UI_NITZ_TIME_UPDATE_POPUP)) {
-               if(1) {
+               if (1) {
                        info("Launch NITZ Time Update popup (Only for First NITZ)");
                        launch_telephony_popup(IPC_MSG_DISPLAY_NITZ_TIME_UPDATE, "", ud);
                }
@@ -540,7 +538,8 @@ static void on_hook_nitz_gmt_change(keynode_t* node, void* user_data) {
        }
 }
 
-static void on_power_saving_mode_changed(keynode_t* node, void* user_data) {
+static void on_power_saving_mode_changed(keynode_t* node, void* user_data)
+{
        TcorePlugin *p = user_data;
        ui_noti_data *ud = tcore_plugin_ref_user_data(p);
        guint id;
@@ -596,7 +595,7 @@ static enum tcore_hook_return on_hook_sim_status(Server *s, CoreObject *source,
                }
        }
 
-       switch(ud->sim_status[id]) {
+       switch (ud->sim_status[id]) {
        case SIM_STATUS_CARD_NOT_PRESENT:
        case SIM_STATUS_CARD_ERROR:
                /*
@@ -621,7 +620,7 @@ static enum tcore_hook_return on_hook_sim_status(Server *s, CoreObject *source,
                launch_telephony_popup(IPC_MSG_SIM_NOT_PRESENTED, "", ud);
 #endif
                //if (tfeature_is_supported(TFEATURE_UI_SIM_RAISE_INVALID_SIM_POPUP)) {
-        if(1) {
+               if (1) {
                        launch_telephony_popup(IPC_MSG_SIM_CARD_CRASHED, "", ud);
                } else {
                        launch_telephony_popup(IPC_MSG_SIM_CARD_REMOVED, "", ud);
@@ -687,27 +686,27 @@ static void on_storage_key_callback(enum tcore_storage_key key, void *value, voi
                return;
        }
 
-       switch(key) {
-               case STORAGE_KEY_FLIGHT_MODE_BOOL:
-               case STORAGE_KEY_SETAPPL_STATE_DATA_ROAMING_BOOL:
-               case STORAGE_KEY_3G_ENABLE:
-               {
-                       type_check = g_variant_is_of_type(tmp, G_VARIANT_TYPE_BOOLEAN);
-                       if (!type_check){
-                               err("wrong variant data type");
-                               g_variant_unref(tmp);
-                               return;
-                       }
-               }
-               break;
-               default: {
-                       warn("unknown key");
+       switch (key) {
+       case STORAGE_KEY_FLIGHT_MODE_BOOL:
+       case STORAGE_KEY_SETAPPL_STATE_DATA_ROAMING_BOOL:
+       case STORAGE_KEY_3G_ENABLE:
+       {
+               type_check = g_variant_is_of_type(tmp, G_VARIANT_TYPE_BOOLEAN);
+               if (!type_check) {
+                       err("wrong variant data type");
+                       g_variant_unref(tmp);
                        return;
                }
-               break;
+       }
+       break;
+       default: {
+               warn("unknown key");
+               return;
+       }
+       break;
        }
 
-       if (key == STORAGE_KEY_FLIGHT_MODE_BOOL){
+       if (key == STORAGE_KEY_FLIGHT_MODE_BOOL) {
                gboolean new_mode;
                new_mode = g_variant_get_boolean(tmp);
                _process_flight_mode_state(p, new_mode);
@@ -752,9 +751,9 @@ gboolean ui_notifier_init(TcorePlugin *plugin)
                ud->first_bootup_sim[id] = FALSE;
                ud->roaming_status[id] = 0;
                if (id == SLOT_ID_PRIMARY) {
-                       ud->manual_plmn[id] = vconf_get_str (VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN_SIM1);
+                       ud->manual_plmn[id] = vconf_get_str(VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN_SIM1);
                } else if (id == SLOT_ID_SECONDARY) {
-                       ud->manual_plmn[id] = vconf_get_str (VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN_SIM2);
+                       ud->manual_plmn[id] = vconf_get_str(VCONFKEY_TELEPHONY_PRIVATE_MANUAL_PLMN_SIM2);
                } else {
                        warn("Unsupported id(%d)", id);
                        break;
index ee68a042601d6a5e02c74e985742687bedeaa210..1edc92c72fd564217f4c5668b73af6b48f025352 100644 (file)
@@ -82,7 +82,7 @@ static void _on_response_selection_mode(UserRequest *ur,
                tcore_object_set_property(co, PROP_NET_MANUAL_PLMN, NULL);
        } else {
                info("Manual Selection mode.");
-               manual_plmn = tcore_object_ref_property (co, PROP_NET_MANUAL_PLMN);
+               manual_plmn = tcore_object_ref_property(co, PROP_NET_MANUAL_PLMN);
                launch_telephony_popup(IPC_MSG_NETWORK_MANUAL_FAIL_POPUP, "", net_selection_info->ud);
                _network_get_name_from_plmn(co, name, manual_plmn);
                if (id == SLOT_ID_PRIMARY)
@@ -105,7 +105,7 @@ static void _check_net_selection_mode_from_modem(ui_noti_data *ud, sim_slot_id i
                net_selection_info->ud = ud;
                net_selection_info->id = id;
 
-               ur = tcore_user_request_new (NULL, NULL);
+               ur = tcore_user_request_new(NULL, NULL);
                tcore_user_request_set_command(ur, TREQ_NETWORK_GET_PLMN_SELECTION_MODE);
                tcore_user_request_set_response_hook(ur, _on_response_selection_mode, net_selection_info);
                if (TCORE_RETURN_SUCCESS != tcore_object_dispatch_request(ud->co_network[id], ur)) {
@@ -125,7 +125,7 @@ static gboolean _on_timeout_no_svc_waiting(gpointer user_cb_data)
 
        tcore_network_get_service_type(ud->co_network[id], &svc_type);
        if (svc_type > NETWORK_SERVICE_TYPE_SEARCH) {
-               info ("In Service. Do not launch popup");
+               info("In Service. Do not launch popup");
        } else {
                dbg("For slot(%d), no svc timeout. check network mode again", id);
                _check_net_selection_mode_from_modem(ud, id);
@@ -142,7 +142,7 @@ void launch_no_svc_with_manual_plmn_popup(ui_noti_data *ud, sim_slot_id id)
 
        //tempporaily modify for build
        //if (tfeature_is_supported(TFEATURE_UI_NO_SVC_MANUAL_PLMN_CHECK)) {
-       if(1) {
+       if (1) {
                unsigned int timeout = NO_SVC_WAITING_TIMEOUT;
                cancel_no_svc_with_manual_plmn_popup(ud, id);
                cb_data = calloc(sizeof(manual_plmn_data), 1);
@@ -154,11 +154,11 @@ void launch_no_svc_with_manual_plmn_popup(ui_noti_data *ud, sim_slot_id id)
                cb_data->id = id;
                ud->manual_plmn_cb_data[id] = cb_data;
 
-               value = tcore_object_ref_property (ud->co_network[id], PROP_NET_MANUAL_SELECTION_STATUS);
-               info ("slot(%d), manual selection status = %s", id, value);
+               value = tcore_object_ref_property(ud->co_network[id], PROP_NET_MANUAL_SELECTION_STATUS);
+               info("slot(%d), manual selection status = %s", id, value);
 
-               if (g_strcmp0 (value, "failure") == 0) {
-                       dbg ("manual selection failed. Launch popup");
+               if (g_strcmp0(value, "failure") == 0) {
+                       dbg("manual selection failed. Launch popup");
                        _on_timeout_no_svc_waiting(cb_data);
                } else {
                        ud->no_svc_timer_id[id] = g_timeout_add_seconds(timeout,
@@ -180,8 +180,7 @@ void cancel_no_svc_with_manual_plmn_popup(ui_noti_data *ud, sim_slot_id id)
                ret = g_source_remove(ud->no_svc_timer_id[id]);
                if (FALSE == ret) {
                        warn("g_source_remove fail");
-               }
-               else {
+               } else {
                        dbg("timer(%d) was cancelled", ud->no_svc_timer_id[id]);
                }
                ud->no_svc_timer_id[id] = 0;
@@ -189,7 +188,7 @@ void cancel_no_svc_with_manual_plmn_popup(ui_noti_data *ud, sim_slot_id id)
                        free(ud->manual_plmn_cb_data[id]);
        }
        if (ud->manual_plmn_noti_launched[id] == TRUE) {
-               manual_plmn = tcore_object_ref_property (ud->co_network[id], PROP_NET_MANUAL_PLMN);
+               manual_plmn = tcore_object_ref_property(ud->co_network[id], PROP_NET_MANUAL_PLMN);
                _network_get_name_from_plmn(ud->co_network[id], name, manual_plmn);
                if (id == SLOT_ID_PRIMARY)
                        launch_telephony_popup(IPC_MSG_SIM1_DEL_NETWORK_MANUAL_FAIL_NOTI, name, ud);
@@ -203,7 +202,7 @@ void launch_timezone_select_popup(ui_noti_data *ud)
 {
        launch_telephony_popup(IPC_MSG_NITZ_MANUL_DATE_AND_TIME, "", ud);
 
-       tcore_object_set_property (ud->co_network[SLOT_ID_DEFAULT], PROP_NET_NITZ_TIMEZONE, "requested");
+       tcore_object_set_property(ud->co_network[SLOT_ID_DEFAULT], PROP_NET_NITZ_TIMEZONE, "requested");
 }
 
 void launch_roaming_data_allowed_popup(ui_noti_data *ud)
index e9f7096b813f26322f0b14aaccf7161b9d3eee51..76a03130f7211bdd40c3accce70437c19ba994a4 100644 (file)
@@ -40,7 +40,7 @@ static gpointer __launch_pwlock_internal(gpointer data)
        info("launch pwlock");
 
        bundle_add(kb, "after_bootup", "1");
-       ret = aul_launch_app_for_uid ("com.samsung.pwlock", kb, GLOBAL_USER);
+       ret = aul_launch_app_for_uid("com.samsung.pwlock", kb, GLOBAL_USER);
        if (ret < 0)
                err("Unable to launch pwlock. Error [%d]", ret);
 
@@ -74,7 +74,7 @@ static gpointer __launch_setup_ota_internal(gpointer data)
        int ret;
 
        info("launch setup ota app");
-       ret = aul_launch_app_for_uid ("com.samsung.setup-kt-net", NULL, GLOBAL_USER);
+       ret = aul_launch_app_for_uid("com.samsung.setup-kt-net", NULL, GLOBAL_USER);
        if (ret < 0)
                err("Unable to setup ota. Error [%d]", ret);
 
@@ -99,12 +99,12 @@ RETRY:
                goto EXIT;
        }
 
-       if(payload->message) {
-               bundle_add (kb, POPUP_IPC, payload->message);
+       if (payload->message) {
+               bundle_add(kb, POPUP_IPC, payload->message);
        }
 
-       if(payload->param) {
-               bundle_add (kb, POPUP_IPC_PARAM, payload->param);
+       if (payload->param) {
+               bundle_add(kb, POPUP_IPC_PARAM, payload->param);
        }
 
        info("Request sent to launch %s", AUL_NAME);
@@ -112,7 +112,7 @@ RETRY:
        bundle_free(kb);
 
        if (ret < 0 && retry_count < 5) {
-               err("fail to launch (%d). Retry count [%d]",ret, retry_count);
+               err("fail to launch (%d). Retry count [%d]", ret, retry_count);
                retry_count++;
                g_usleep(G_USEC_PER_SEC * 1);
                goto RETRY;
index a139ecb7ce7d3a7cebb308f6cac4e5f2f05a02a3..38e9edceba648d3fe2d940cb952de34cb05aec90 100644 (file)
 #include "notifier_internal.h"
 #include "notifier_util.h"
 
-#define MODEM_INDEX_UNDECIDED  0
-#define MODEM_INDEX_PRIMARY            1
-#define MODEM_INDEX_SECONDARY  2
-#define MODEM_INDEX_TERTIARY           3
-#define MODEM_INDEX_INVALID            -1
+#define MODEM_INDEX_UNDECIDED  0
+#define MODEM_INDEX_PRIMARY            1
+#define MODEM_INDEX_SECONDARY  2
+#define MODEM_INDEX_TERTIARY   3
+#define MODEM_INDEX_INVALID            -1
 
 static int __get_modem_index(TcorePlugin *plugin)
 {
@@ -49,7 +49,7 @@ static int __get_modem_index(TcorePlugin *plugin)
                return MODEM_INDEX_PRIMARY;
        else if (g_str_has_suffix(cp_name , "1"))
                return MODEM_INDEX_SECONDARY;
-       else if(g_str_has_suffix(cp_name , "2"))
+       else if (g_str_has_suffix(cp_name , "2"))
                return MODEM_INDEX_TERTIARY;
        else
                return MODEM_INDEX_INVALID;
@@ -68,8 +68,8 @@ static gboolean __is_ongoing_call_exist(CoreObject *co_call)
                return FALSE;
        }
 
-       for(call_status_count = TCORE_CALL_STATUS_ACTIVE; call_status_count <= TCORE_CALL_STATUS_WAITING; call_status_count++) {
-               call_obj_list = tcore_call_object_find_by_status(co_call,call_status_count);
+       for (call_status_count = TCORE_CALL_STATUS_ACTIVE; call_status_count <= TCORE_CALL_STATUS_WAITING; call_status_count++) {
+               call_obj_list = tcore_call_object_find_by_status(co_call, call_status_count);
                if (call_obj_list) {
                        dbg("ongoing call(s) exist");
                        g_slist_free(call_obj_list);
@@ -97,13 +97,13 @@ static void __set_preferred_network(TcorePlugin *plugin, int modem_index,
                return;
        }
 
-       switch(pv) {
+       switch (pv) {
        case CALL_PREFERRED_VOICE_SUBS_UNKNOWN:
        case CALL_PREFERRED_VOICE_SUBS_CURRENT_NETWORK:
        case CALL_PREFERRED_VOICE_SUBS_ASK_ALWAYS:
                /* preferred network have pirority to preferred voice - ignore preferred voice */
                /* SET preferred network to vconf */
-               switch(modem_index ) {
+               switch (modem_index) {
                case MODEM_INDEX_PRIMARY:
                        req.default_subs = NETWORK_DEFAULT_SUBS_SIM1;
                break;
@@ -128,7 +128,7 @@ static void __set_preferred_network(TcorePlugin *plugin, int modem_index,
                /* set preferred network vconf */
                req.default_subs = NETWORK_DEFAULT_SUBS_SIM2;
        break;
-       default :
+       default:
                req.default_subs = NETWORK_DEFAULT_SUBS_UNKNOWN;
        break;
        }
@@ -168,13 +168,13 @@ static void __apply_preferred_voice_change(TcorePlugin *plugin)
                }
 
                co_call = tcore_plugin_ref_core_object(modem_plgn, CORE_OBJECT_TYPE_CALL);
-               if(!co_call) {
+               if (!co_call) {
                        dbg("call_obj not found - skip this plugin ");
                        continue;
                }
 
                /* if exist, sustain modem index with PN value */
-               if(__is_ongoing_call_exist(co_call)) {
+               if (__is_ongoing_call_exist(co_call)) {
                        dbg("call exist - sustain current PN value");
                        b_set_preferred_network = FALSE;
                        break;
@@ -219,7 +219,7 @@ static void __get_preferred_voice(TcorePlugin *plugin)
        for (iter = modem_list; iter != NULL; iter = iter->next) {
                modem_plgn = iter->data;
                co_call = tcore_plugin_ref_core_object(modem_plgn, CORE_OBJECT_TYPE_CALL);
-               if(co_call)
+               if (co_call)
                        break;
        }
        g_slist_free(modem_list);
@@ -249,7 +249,7 @@ static enum tcore_hook_return on_hook_call_status_change(Server *s, CoreObject *
        modem_plgn = tcore_object_ref_plugin(source);
        modem_index = __get_modem_index(modem_plgn);
 
-       switch(command) {
+       switch (command) {
        case TNOTI_CALL_STATUS_DIALING:
        case TNOTI_CALL_STATUS_INCOMING:
                /* call being setup - update pn to comply ongoing line */
index 0ff542332de93134a1f9ef8a9a35cfcc2ab3b60f..51c467cf416cae0b4519b18b51046eaa6f91b738 100644 (file)
@@ -66,7 +66,7 @@ static enum tcore_hook_return on_hook_sim_status(Server *s,
                        slot_id == SLOT_ID_PRIMARY ? sim_status : other_sim_status,
                        slot_id == SLOT_ID_PRIMARY ? other_sim_status : sim_status);
 
-       ret= vconf_get_int(VCONFKEY_TELEPHONY_PREFERRED_VOICE_SUBSCRIPTION, &pref_voice_subscription);
+       ret = vconf_get_int(VCONFKEY_TELEPHONY_PREFERRED_VOICE_SUBSCRIPTION, &pref_voice_subscription);
        if (ret < 0) {
                err("vconf_get_int() failed - Preferred Voice Subscription");
                return TCORE_HOOK_RETURN_CONTINUE;
index 87a6971c5d4cffed295ba4236a794e457305c190..fe15c9c0a68bbeda7f09f6d449f4ecbb54b3b00c 100644 (file)
@@ -49,7 +49,7 @@ float ui_notifier_check_uptime()
        fp = fopen("/proc/uptime", "r");
 
        if (fp) {
-               if(fscanf(fp, "%f %f", &uptime, &b)){};
+               if (fscanf(fp, "%f %f", &uptime, &b)) {};
                fclose(fp);
        }
        dbg("uptime=[%f]", uptime);