Commit 6bfaf64c authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Revert "STK Call Control feature implementation."

This reverts commit 61bedcf4.

Change-Id: I257968ecc3c5e18f3b9cd6371e76846676c82447
parent 61bedcf4
......@@ -101,21 +101,7 @@ typedef enum {
RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
illegal SIM or ME */
RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
data */
RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
request */
RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
RIL_E_SS_MODIFIED_TO_SS = 27 /* SS request modified to different SS request */
RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
} RIL_Errno;
typedef enum {
......@@ -540,9 +526,6 @@ typedef enum {
CALL_FAIL_FDN_BLOCKED = 241,
CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
CALL_FAIL_CDMA_DROP = 1001,
CALL_FAIL_CDMA_INTERCEPT = 1002,
......@@ -1225,80 +1208,6 @@ typedef struct {
} cfg;
} RIL_HardwareConfig;
typedef enum {
SS_CFU,
SS_CF_BUSY,
SS_CF_NO_REPLY,
SS_CF_NOT_REACHABLE,
SS_CF_ALL,
SS_CF_ALL_CONDITIONAL,
SS_CLIP,
SS_CLIR,
SS_COLP,
SS_COLR,
SS_WAIT,
SS_BAOC,
SS_BAOIC,
SS_BAOIC_EXC_HOME,
SS_BAIC,
SS_BAIC_ROAMING,
SS_ALL_BARRING,
SS_OUTGOING_BARRING,
SS_INCOMING_BARRING
} RIL_SsServiceType;
typedef enum {
SS_ACTIVATION,
SS_DEACTIVATION,
SS_INTERROGATION,
SS_REGISTRATION,
SS_ERASURE
} RIL_SsRequestType;
typedef enum {
SS_ALL_TELE_AND_BEARER_SERVICES,
SS_ALL_TELESEVICES,
SS_TELEPHONY,
SS_ALL_DATA_TELESERVICES,
SS_SMS_SERVICES,
SS_ALL_TELESERVICES_EXCEPT_SMS
} RIL_SsTeleserviceType;
#define SS_INFO_MAX 4
#define NUM_SERVICE_CLASSES 7
typedef struct {
int numValidIndexes; /* This gives the number of valid values in cfInfo.
For example if voice is forwarded to one number and data
is forwarded to a different one then numValidIndexes will be
2 indicating total number of valid values in cfInfo.
Similarly if all the services are forwarded to the same
number then the value of numValidIndexes will be 1. */
RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
for SS request to query call
forward status. see
RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
} RIL_CfData;
typedef struct {
RIL_SsServiceType serviceType;
RIL_SsRequestType requestType;
RIL_SsTeleserviceType teleserviceType;
int serviceClass;
RIL_Errno result;
union {
int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
two ints, so first two values of ssInfo[] will be
used for response if serviceType is SS_CLIR and
requestType is SS_INTERROGATION */
RIL_CfData cfData;
};
} RIL_StkCcUnsolSsResponse;
/**
* Data connection power state
*/
......@@ -1388,6 +1297,7 @@ typedef struct {
#define RIL_REQUEST_ENTER_SIM_PIN 2
/**
* RIL_REQUEST_ENTER_SIM_PUK
*
......@@ -1565,9 +1475,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* DIAL_MODIFIED_TO_USSD
* DIAL_MODIFIED_TO_SS
* DIAL_MODIFIED_TO_DIAL
* GENERIC_FAILURE
*/
#define RIL_REQUEST_DIAL 10
......@@ -2171,9 +2078,6 @@ typedef struct {
* SUCCESS
* RADIO_NOT_AVAILABLE
* FDN_CHECK_FAILURE
* USSD_MODIFIED_TO_DIAL
* USSD_MODIFIED_TO_SS
* USSD_MODIFIED_TO_USSD
* GENERIC_FAILURE
*
* See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
......@@ -2209,9 +2113,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_CLIR 31
......@@ -2227,9 +2128,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CLIR 32
......@@ -2253,9 +2151,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
......@@ -2272,9 +2167,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CALL_FORWARD 34
......@@ -2301,9 +2193,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CALL_WAITING 35
......@@ -2323,9 +2212,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CALL_WAITING 36
......@@ -2468,9 +2354,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*
*/
......@@ -2500,9 +2383,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*
*/
......@@ -2525,9 +2405,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*
*/
......@@ -2748,9 +2625,6 @@ typedef struct {
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* SS_MODIFIED_TO_DIAL
* SS_MODIFIED_TO_USSD
* SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
......@@ -4448,6 +4322,7 @@ typedef struct {
*/
#define RIL_UNSOL_ON_USSD_REQUEST 1007
/**
* RIL_UNSOL_NITZ_TIME_RECEIVED
*
......@@ -4879,30 +4754,8 @@ typedef struct {
*/
#define RIL_UNSOL_RADIO_CAPABILITY 1042
/*
* RIL_UNSOL_ON_SS
*
* Called when SS response is received when DIAL/USSD/SS is changed to SS by
* call control.
*
* "data" is const RIL_StkCcUnsolSsResponse *
*
*/
#define RIL_UNSOL_ON_SS 1043
/**
* RIL_UNSOL_STK_CC_ALPHA_NOTIFY
*
* Called when there is an ALPHA from UICC during Call Control.
*
* "data" is const char * containing ALPHA string from UICC in UTF-8 format.
*
*/
#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
/***********************************************************************/
#if defined(ANDROID_MULTI_SIM)
/**
* RIL_Request Function pointer
......
......@@ -305,14 +305,10 @@ static int responseCellInfoList(Parcel &p, void *response, size_t responselen);
static int responseHardwareConfig(Parcel &p, void *response, size_t responselen);
static int responseDcRtInfo(Parcel &p, void *response, size_t responselen);
static int responseRadioCapability(Parcel &p, void *response, size_t responselen);
static int responseSSData(Parcel &p, void *response, size_t responselen);
static int decodeVoiceRadioTechnology (RIL_RadioState radioState);
static int decodeCdmaSubscriptionSource (RIL_RadioState radioState);
static RIL_RadioState processRadioState(RIL_RadioState newRadioState);
static bool isServiceTypeCfQuery(RIL_SsServiceType serType, RIL_SsRequestType reqType);
#ifdef RIL_SHLIB
#if defined(ANDROID_MULTI_SIM)
extern "C" void RIL_onUnsolicitedResponse(int unsolResponse, void *data,
......@@ -3242,84 +3238,6 @@ static int responseRadioCapability(Parcel &p, void *response, size_t responselen
return 0;
}
static int responseSSData(Parcel &p, void *response, size_t responselen) {
RLOGD("In responseSSData");
int num;
if (response == NULL && responselen != 0) {
RLOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof (RIL_SIM_IO_Response));
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof(RIL_StkCcUnsolSsResponse)) {
RLOGE("invalid response length %d, expected %d",
(int)responselen, (int)sizeof(RIL_StkCcUnsolSsResponse));
return RIL_ERRNO_INVALID_RESPONSE;
}
startResponse;
RIL_StkCcUnsolSsResponse *p_cur = (RIL_StkCcUnsolSsResponse *) response;
p.writeInt32(p_cur->serviceType);
p.writeInt32(p_cur->requestType);
p.writeInt32(p_cur->teleserviceType);
p.writeInt32(p_cur->serviceClass);
p.writeInt32(p_cur->result);
if (isServiceTypeCfQuery(p_cur->serviceType, p_cur->requestType)) {
RLOGD("responseSSData CF type, num of Cf elements %d", p_cur->cfData.numValidIndexes);
if (p_cur->cfData.numValidIndexes > NUM_SERVICE_CLASSES) {
RLOGE("numValidIndexes is greater than max value %d, "
"truncating it to max value", NUM_SERVICE_CLASSES);
p_cur->cfData.numValidIndexes = NUM_SERVICE_CLASSES;
}
/* number of call info's */
p.writeInt32(p_cur->cfData.numValidIndexes);
for (int i = 0; i < p_cur->cfData.numValidIndexes; i++) {
RIL_CallForwardInfo cf = p_cur->cfData.cfInfo[i];
p.writeInt32(cf.status);
p.writeInt32(cf.reason);
p.writeInt32(cf.serviceClass);
p.writeInt32(cf.toa);
writeStringToParcel(p, cf.number);
p.writeInt32(cf.timeSeconds);
appendPrintBuf("%s[%s,reason=%d,cls=%d,toa=%d,%s,tout=%d],", printBuf,
(cf.status==1)?"enable":"disable", cf.reason, cf.serviceClass, cf.toa,
(char*)cf.number, cf.timeSeconds);
RLOGD("Data: %d,reason=%d,cls=%d,toa=%d,num=%s,tout=%d],", cf.status,
cf.reason, cf.serviceClass, cf.toa, (char*)cf.number, cf.timeSeconds);
}
} else {
p.writeInt32 (SS_INFO_MAX);
/* each int*/
for (int i = 0; i < SS_INFO_MAX; i++) {
appendPrintBuf("%s%d,", printBuf, p_cur->ssInfo[i]);
RLOGD("Data: %d",p_cur->ssInfo[i]);
p.writeInt32(p_cur->ssInfo[i]);
}
}
removeLastChar;
closeResponse;
return 0;
}
static bool isServiceTypeCfQuery(RIL_SsServiceType serType, RIL_SsRequestType reqType) {
if ((reqType == SS_INTERROGATION) &&
(serType == SS_CFU ||
serType == SS_CF_BUSY ||
serType == SS_CF_NO_REPLY ||
serType == SS_CF_NOT_REACHABLE ||
serType == SS_CF_ALL ||
serType == SS_CF_ALL_CONDITIONAL)) {
return true;
}
return false;
}
static void triggerEvLoop() {
int ret;
if (!pthread_equal(pthread_self(), s_tid_dispatch)) {
......
......@@ -57,5 +57,3 @@
{RIL_UNSOL_HARDWARE_CONFIG_CHANGED, responseHardwareConfig, WAKE_PARTIAL},
{RIL_UNSOL_DC_RT_INFO_CHANGED, responseDcRtInfo, WAKE_PARTIAL},
{RIL_UNSOL_RADIO_CAPABILITY, responseRadioCapability, WAKE_PARTIAL},
{RIL_UNSOL_ON_SS, responseSSData, WAKE_PARTIAL},
{RIL_UNSOL_STK_CC_ALPHA_NOTIFY, responseString, WAKE_PARTIAL},
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment