Disable add same apn type for v2.
Change-Id: I9ad2a9c4a7463cc65d5837e385e70b050eeb138c
diff --git a/mbtk/mbtk_rild_v2/src/ril_data_call.c b/mbtk/mbtk_rild_v2/src/ril_data_call.c
index c4b5a78..5a0429c 100755
--- a/mbtk/mbtk_rild_v2/src/ril_data_call.c
+++ b/mbtk/mbtk_rild_v2/src/ril_data_call.c
@@ -482,13 +482,14 @@
#else
index = 0;
while(index < apns.num) {
- if(strcmp((char*)apns.apns[index].apn,(char*)apn->apn) == 0) {
- if(!is_change) { // Is add,the APN can't same.
- LOGW("APN : %s exist, can't add.", apn->apn);
+ if(strcmp((char*)apns.apns[index].apn,(char*)apn->apn) == 0
+ || (strlen((char*)apns.apns[index].type) > 0 && strcmp((char*)apns.apns[index].type,(char*)apn->type) == 0)) {
+ if(!is_change) { // Is add,the APN name/type can't same.
+ LOGW("APN : %s/%s exist, can't add.", apn->apn, apn->type);
return -1;
- } else { // Is change, not change apn name to other cid.
+ } else { // Is change, not change apn name/type to other cid.
if(index != apn->cid) {
- LOGW("APN : %s exist in cid[%d], can't change to cid[%d]", apn->apn,
+ LOGW("APN : %s/%s exist in cid[%d], can't change to cid[%d]", apn->apn, apn->type,
index, apn->cid);
return -1;
}