兼容 dev_info v1
Change-Id: I5659a6275f96f68867d4fd753c05915576dee568
diff --git a/mbtk/mbtk_rild_v2/src/main.c b/mbtk/mbtk_rild_v2/src/main.c
index f768ce6..4b8d320 100755
--- a/mbtk/mbtk_rild_v2/src/main.c
+++ b/mbtk/mbtk_rild_v2/src/main.c
@@ -2566,6 +2566,7 @@
if(mbtk_dev_info_read(MBTK_DEVICE_INFO_ITEM_MODEM, &(info_modem), sizeof(mbtk_device_info_modem_t))) {
LOGD("mbtk_dev_info_read(MODEM) fail, use default band.");
band_info.band_area = MBTK_MODEM_BAND_AREA_ALL;
+#ifdef MBTK_DEV_INFO_VERSION_2
#ifdef MBTK_5G_SUPPORT
band_info.band_support.net_pref = MBTK_NET_PREF_LTE_NR_NR_PREF; // 19
band_info.net_support = MBTK_NET_SUPPORT_4G | MBTK_NET_SUPPORT_5G;
@@ -2573,15 +2574,18 @@
band_info.band_support.net_pref = MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF; // 15
band_info.net_support = MBTK_NET_SUPPORT_2G | MBTK_NET_SUPPORT_3G | MBTK_NET_SUPPORT_4G;
#endif
+#endif
band_info.band_support.gsm_band = MBTK_BAND_ALL_GSM_DEFAULT;
band_info.band_support.umts_band = MBTK_BAND_ALL_WCDMA_DEFAULT;
band_info.band_support.tdlte_band = MBTK_BAND_ALL_TDLTE_DEFAULT;
band_info.band_support.fddlte_band = MBTK_BAND_ALL_FDDLTE_DEFAULT;
band_info.band_support.lte_ext_band = MBTK_BAND_ALL_EXT_LTE_DEFAULT;
+#ifdef MBTK_DEV_INFO_VERSION_2
band_info.band_support.nr_3_band = MBTK_BAND_ALL_NR_3_DEFAULT;
band_info.band_support.nr_2_band = MBTK_BAND_ALL_NR_2_DEFAULT;
band_info.band_support.nr_1_band = MBTK_BAND_ALL_NR_1_DEFAULT;
band_info.band_support.nr_0_band = MBTK_BAND_ALL_NR_0_DEFAULT;
+#endif
} else {
band_info.band_area = info_modem.band_area;
#ifdef MBTK_DEV_INFO_VERSION_2
@@ -2603,10 +2607,12 @@
band_info.band_support.tdlte_band = info_modem.band_tdlte;
band_info.band_support.fddlte_band = info_modem.band_fddlte;
band_info.band_support.lte_ext_band = info_modem.band_lte_ext;
+#ifdef MBTK_DEV_INFO_VERSION_2
band_info.band_support.nr_3_band = info_modem.band_nr_3;
band_info.band_support.nr_2_band = info_modem.band_nr_2;
band_info.band_support.nr_1_band = info_modem.band_nr_1;
band_info.band_support.nr_0_band = info_modem.band_nr_0;
+#endif
}
// bool is_first = TRUE;