Lines Matching refs:state

38  * Set radio state
60 function RilCall(state, phoneNumber, callerName) {
61 this.state = state;
177 * @return the first call that is in the given state
185 if (calls[i].state == callState) {
197 this.addCall = function(state, phoneNumber, callerName) {
202 c = new RilCall(state, phoneNumber, callerName);
249 print('c[' + c.index + ']: index=' + c.index + ' state=' + c.state +
274 * Count number of calls in the given state
276 * @param callState is the give state
281 // not a valid call state
286 if (calls[i].state == callState) {
400 // Set call state to dialing
408 // Update call state to alerting after 1 second
414 // Update call state to active after 2 seconds
451 switch (calls[i].state) {
487 switch (calls[i].state) {
493 calls[i].state = CALLSTATE_ACTIVE;
539 switch (calls[i].state) {
541 calls[i].state = CALLSTATE_HOLDING;
545 calls[i].state = CALLSTATE_ACTIVE;
580 if ((calls[i].state != CALLSTATE_ACTIVE) &&
581 (calls[i].state != CALLSTATE_HOLDING)) {
587 // if there are calls not in ACITVE or HOLDING state, return error
594 switch (calls[i].state) {
598 calls[i].state = CALLSTATE_ACTIVE;
721 if (calls[i].state == CALLSTATE_INCOMING) {
722 calls[i].state = CALLSTATE_ACTIVE;
806 if (separateConn.state != CALLSTATE_ACTIVE) {
815 switch (calls[i].state) {
817 calls[i].state = CALLSTATE_HOLDING;
843 print('Radio: rilRequestSetMute: req.data.state=' + req.data.state);
844 muteState = req.data.state;
857 print('Radio: rilRequestScreenState: req.data.state=' + req.data.state);
858 screenState = req.data.state;
914 * Simulate call state change
922 // if it is an outgoing call, update the call state of the call
923 // Send out call state changed flag
928 curCall.state = req.nextState;
933 // TODO: if it is an incoming call, update the call state of the call
934 // Send out call state change flag
963 * return CTRL_STATUS_OK and update the call state
970 var state;
973 // If there is no connection in use, the call state is INCOMING
974 state = CALLSTATE_INCOMING;
980 if ( (calls[i].state == CALLSTATE_DIALING) ||
981 (calls[i].state == CALLSTATE_ALERTING) ||
982 (calls[i].state == CALLSTATE_INCOMING) ||
983 (calls[i].state == CALLSTATE_WAITING))
990 // If the incoming call is a second call, the state is WAITING
991 state = CALLSTATE_WAITING;
995 this.addCall(state, phoneNumber, '');
1028 if ((hangupCall.state == CALLSTATE_INCOMING) ||
1029 (hangupCall.state == CALLSTATE_WAITING)) {
1036 // send out call state changed response
1074 calls[index].state = CALLSTATE_ALERTING;
1076 // if there 0 or more than one call in dialing state, return error
1077 print('ctrlServerCmdSetCallAlert: no valid calls in dialing state');
1081 // send unsolicited call state change response
1108 calls[index].state = CALLSTATE_ACTIVE;
1110 print('ctrlServerCmdSetCallActive: no valid calls in alert state');
1114 // send out unsolicited call state change response