[Bugfix][API-570][common] lynq_set_speech_volume lynq_get_speech_volume failure
Change-Id: I92a042cb74a2ec3c2478473827f1980944b2eaaa
diff --git a/framework/lynq-ril-service/src/cc.cpp b/framework/lynq-ril-service/src/cc.cpp
index d8dd3be..4040df3 100755
--- a/framework/lynq-ril-service/src/cc.cpp
+++ b/framework/lynq-ril-service/src/cc.cpp
@@ -815,14 +815,14 @@
}
}
if(pRI != NULL) {
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_RECORD,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_RECORD,0,0);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
}
return 0;
FAIL_RETURN:
if(pRI != NULL) {
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_RECORD,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_RECORD,0,2);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
}
@@ -850,7 +850,7 @@
RLOGD("setSpeechVolume start!");
if(argc < 2) {
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
RLOGW("Warning: no set volume value!");
@@ -862,7 +862,7 @@
if (get_audio_path() == 0) {
if(setValue < MIN_VOLUME || setValue > MAX_VOLUME) {
RLOGW("Warning: set volume value is over-range!");
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
return -1;
@@ -870,7 +870,7 @@
} else {
if(setValue < BT_MIN_VOLUME || setValue > BT_MAX_VOLUME) {
RLOGW("Warning: set bt volume value is over-range!");
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
return -1;
@@ -878,7 +878,7 @@
}
//paramter is from 1 to 7
mixer_set_volume(setValue);
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,0);
printf(">>>>set speech Volume<<<< success value is %d!\n",setValue);
/*Warren add for t800 ril service 2021/12/23 end*/
android::LYNQ_RIL_respSocket_sp(p,pRI);
@@ -894,11 +894,11 @@
if(volumn <0) {
printf("get speech volumn fail, please check whether does call exsit.\n");
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_GET_SPEECH_VOLUME,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_GET_SPEECH_VOLUME,0,2);
/*Warren add for t800 ril service 2021/12/23 end*/
} else {
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_GET_SPEECH_VOLUME,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_GET_SPEECH_VOLUME,0,0);
/*Warren add for t800 ril service 2021/12/23 end*/
}
printf("current Speech Volume is%d",volumn);
@@ -918,7 +918,7 @@
if(argc < 2) {
RLOGW("Warning: no set volume value!");
printf("Warning: no set volume value!\n");
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_DTMF_VOLUME,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_SET_DTMF_VOLUME,0,2);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
return -1;
@@ -931,7 +931,7 @@
RLOGW("Warning: set volume value is over-range!");
printf("set dtmf Volume value is %d!\n",setValue);
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_DTMF_VOLUME,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_SET_DTMF_VOLUME,0,2);
android::LYNQ_RIL_respSocket_sp(p,pRI);
/*Warren add for t800 ril service 2021/12/23 end*/
free(pRI);
@@ -941,7 +941,7 @@
dtmf_volume = setValue;
printf(">>>>set dtmf Volume<<<< success value is %d!\n",setValue);
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_DTMF_VOLUME,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_SET_DTMF_VOLUME,0,0);
printf(">>>>set dtmf Volume<<<< success value is %d!\n",setValue);
/*Warren add for t800 ril service 2021/12/23 end*/
android::LYNQ_RIL_respSocket_sp(p,pRI);
@@ -1453,12 +1453,12 @@
int ret = setCallMute(mute);
if(ret) {
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_SET_MUTE,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,RIL_REQUEST_SET_MUTE,0,2);
/*Warren add for t800 ril service 2021/12/23 start*/
printf("set mute fail, please try agian\n");
} else {
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_SET_MUTE,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,RIL_REQUEST_SET_MUTE,0,0);
/*Warren add for t800 ril service 2021/12/23 start*/
}
/*Warren add for t800 ril service 2021/12/23 start*/
@@ -1482,11 +1482,11 @@
if(mute < 0) {
printf("get mute state fail, please check whether does call exsit.\n");
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_GET_MUTE,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,RIL_REQUEST_GET_MUTE,0,2);
/*Warren add for t800 ril service 2021/12/23 end*/
} else {
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_GET_MUTE,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,RIL_REQUEST_GET_MUTE,0,0);
/*Warren add for t800 ril service 2021/12/23 end*/
}
printf("current mute state is%s",((mute == 1) ? "on\n" : "off\n"));
diff --git a/framework/lynq-ril-service/src/common.h b/framework/lynq-ril-service/src/common.h
index 7216686..b7623c6 100755
--- a/framework/lynq-ril-service/src/common.h
+++ b/framework/lynq-ril-service/src/common.h
@@ -259,7 +259,7 @@
int lynqSocketSendto(int fd,struct sockaddr *dest_addr,int addr_len,char msg[]);
/*Warren add for t800 RIL Service 2021/12/10 end*/
/*Warren add for t800 ril service 2021/12/23 start*/
- int lynqAssemblyParcelheader(Parcel &p,int slot,int request,int respType,int error);
+ int lynqAssemblyParcelheader(Parcel &p,int slot,int utoken,int request,int respType,int error);
int LYNQ_RIL_respSocket(Parcel &p,RIL_Token t);
int LYNQ_RIL_respSocket_sp(Parcel &p,RequestInfo *pRI);
int LYNQ_RIL_urcBroadcast(Parcel &p);
diff --git a/framework/lynq-ril-service/src/ecall/eCall.cpp b/framework/lynq-ril-service/src/ecall/eCall.cpp
index 5e2b3e7..7c2b400 100755
--- a/framework/lynq-ril-service/src/ecall/eCall.cpp
+++ b/framework/lynq-ril-service/src/ecall/eCall.cpp
@@ -859,14 +859,14 @@
if(enable<0 && enable> -100)
{
g_ecall_test=-enable;
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_ECALL_SET_IVS,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,RIL_REQUEST_ECALL_SET_IVS,0,0);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
return 0;
}
else if(enable <=-100){
g_reset_timer=-enable-100;
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_ECALL_SET_IVS,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,RIL_REQUEST_ECALL_SET_IVS,0,0);
android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
return 0;
diff --git a/framework/lynq-ril-service/src/ril.cpp b/framework/lynq-ril-service/src/ril.cpp
index bae24e6..85b2193 100755
--- a/framework/lynq-ril-service/src/ril.cpp
+++ b/framework/lynq-ril-service/src/ril.cpp
@@ -5826,9 +5826,10 @@
return;
}
/*Warren add for t800 RIL Service 2021/12/10 start*/
-int lynqAssemblyParcelheader(Parcel &p,int slot,int request,int respType,int error)
+int lynqAssemblyParcelheader(Parcel &p,int slot,int utoken, int request,int respType,int error)
{
p.writeInt32 (respType);
+ p.writeInt32 (utoken);
p.writeInt32 (request);
/*warren add for t800 ril servie 2021/12/15 start*/
p.writeInt32(slot);
diff --git a/framework/lynq-ril-service/src/sms/sms.cpp b/framework/lynq-ril-service/src/sms/sms.cpp
index 2a0b402..da62829 100755
--- a/framework/lynq-ril-service/src/sms/sms.cpp
+++ b/framework/lynq-ril-service/src/sms/sms.cpp
@@ -947,14 +947,14 @@
if(argc != 2)
{
RLOGE("%s parameter error!",__func__);
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_READ_SMS_FROM_MEMORY,0,2);//RIL_E_GENERIC_FAILURE
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_READ_SMS_FROM_MEMORY,0,2);//RIL_E_GENERIC_FAILURE
android::LYNQ_RIL_respSocket(p,(void *)pRI);
free(pRI);
return -1;
}
lynq_sms_t smsInfo;
error = g_smsManagement->lynq_read_sms_from_memory(atoi(argv[1]),&smsInfo);
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_READ_SMS_FROM_MEMORY,0,error);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_READ_SMS_FROM_MEMORY,0,error);
RLOGD("addr=%s,smsc=%s,msg=%s\n",smsInfo.address,smsInfo.smsc,smsInfo.sms_text);
if(error==0)
{
@@ -980,13 +980,13 @@
if(argc != 2)
{
RLOGE("%s parameter error!",__func__);
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY,0,2);//RIL_E_GENERIC_FAILURE
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY,0,2);//RIL_E_GENERIC_FAILURE
android::LYNQ_RIL_respSocket(p,(void *)pRI);
free(pRI);
return -1;
}
error = g_smsManagement->lynq_delete_sms_from_memory(atoi(argv[1]));
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY,0,error);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY,0,error);
android::LYNQ_RIL_respSocket(p,(void *)pRI);
free(pRI);
return 0;
@@ -1009,7 +1009,7 @@
if(argc<1)
{
RLOGE("%s parameter error!",__func__);
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_LIST_SMS_FROM_MEMORY,0,2);//RIL_E_GENERIC_FAILURE
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_LIST_SMS_FROM_MEMORY,0,2);//RIL_E_GENERIC_FAILURE
android::LYNQ_RIL_respSocket(p,(void *)pRI);
free(pRI);
return -1;
@@ -1033,7 +1033,7 @@
//writeStringToParcel(p,indexBuf);
}
//printf("indexbuf=%s\n",indexBuf);
- android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_LIST_SMS_FROM_MEMORY,0,error);
+ android::lynqAssemblyParcelheader(p,socket_id,pRI->uToken,LYNQ_REQUEST_LIST_SMS_FROM_MEMORY,0,error);
writeStringToParcel(p,indexBuf);
android::LYNQ_RIL_respSocket(p,(void *)pRI);
free(pRI);
diff --git a/lib/liblynq-network/lynq_network.cpp b/lib/liblynq-network/lynq_network.cpp
index 82a02c5..b735a25 100755
--- a/lib/liblynq-network/lynq_network.cpp
+++ b/lib/liblynq-network/lynq_network.cpp
@@ -209,7 +209,7 @@
waitResponse_end:
LYINFLOG("%s wait token is %d wakeup_token is %d, cnt is %d",__func__,waitToken,wakeup_token,cnt);
BLOCK_RC_MSG_UNLOCK();
- return !(wakeup_token==waitToken);
+ return wakeup_token==waitToken ? 0:LYNQ_E_TIME_OUT;
}
int JumpHeader(Parcel &p,int *resp_type,int* token,int *request,int *slot_id,int *error)
@@ -1515,7 +1515,7 @@
LYINFLOG("%s suc",__func__);
delete p;
- return -1;
+ return 0;
}
LYERRLOG("%s send request error %d",__func__,ret);