Add NR network info to get serving network 52/230452/2
authorsinikang <sinikang@samsung.com>
Fri, 10 Apr 2020 04:21:35 +0000 (13:21 +0900)
committersinikang <sinikang@samsung.com>
Fri, 10 Apr 2020 04:26:39 +0000 (13:26 +0900)
Change-Id: I546754105a078b0489313988bb6741df037bae94
Signed-off-by: sinikang <sinikang@samsung.com>
packaging/tel-plugin-dbus_tapi.spec
src/dtapi_network.c

index 40a3396..5443ea6 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 4
-%define patchlevel 05
+%define patchlevel 06
 
 Name:           tel-plugin-dbus_tapi
 Version:        %{major}.%{minor}.%{patchlevel}
index 94b9200..2b784b6 100644 (file)
@@ -1234,6 +1234,16 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx,
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
                        g_variant_builder_add(&b, "{sv}", "l_serving", value);
                        g_variant_builder_close(&b);
+               } else if (act == NETWORK_ACT_NR) {
+                       value = g_variant_new("(iiiii)",
+                               resp_get_ngbr_cell_info->info.serving.cell.nr.cell_id,
+                               resp_get_ngbr_cell_info->info.serving.cell.nr.pcid,
+                               resp_get_ngbr_cell_info->info.serving.cell.nr.nrarfcn,
+                               resp_get_ngbr_cell_info->info.serving.cell.nr.tac,
+                               resp_get_ngbr_cell_info->info.serving.cell.nr.rssi);
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "n_serving", value);
+                       g_variant_builder_close(&b);
                } else if (act >= NETWORK_ACT_IS95A && act <= NETWORK_ACT_EHRPD) {
                        value = g_variant_new("(uuuuii)",
                                resp_get_ngbr_cell_info->info.serving.cell.cdma.sid,
@@ -1380,7 +1390,7 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx,
                g_variant_builder_add(&b, "{sv}", "serving", value);
                if ((act >= NETWORK_ACT_GSM
                                && act <= NETWORK_ACT_GSM_UTRAN)
-                               || act == NETWORK_ACT_LTE) {
+                               || act == NETWORK_ACT_LTE || act == NETWORK_ACT_NR) {
                        dbg("lac: [%d]", resp_get_serving_network->gsm.lac);
 
                        value = g_variant_new("(i)",
@@ -1635,7 +1645,7 @@ gboolean dbus_plugin_network_notification(struct custom_data *ctx,
 
                /* Update properties */
                tcore_network_get_access_technology(source, &act);
-               if (NETWORK_ACT_LTE == act) {
+               if (NETWORK_ACT_LTE == act || NETWORK_ACT_NR == act) {
                        telephony_network_set_lac(network, -1);
                        telephony_network_set_tac(network, location->lac);