summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2015-11-12 13:06:11 -0600
committerDenis Kenzior <denkenz@gmail.com>2015-11-12 13:17:52 -0600
commite3ee401d72d9453bf8115df9f9198d527e7d2713 (patch)
tree74358047c3637c1d0bc19787448fd352d652cbc5
parent2c987c00449397713a8b41dbe4513d112dc8ef10 (diff)
downloadofono-e3ee401d72d9453bf8115df9f9198d527e7d2713.tar.bz2
rilmodem: Remove auto-answering logic
This was only used for testing at the factory for a specific product. Does not belong in the driver code.
-rw-r--r--drivers/rilmodem/voicecall.c46
-rw-r--r--drivers/rilmodem/voicecall.h1
2 files changed, 0 insertions, 47 deletions
diff --git a/drivers/rilmodem/voicecall.c b/drivers/rilmodem/voicecall.c
index 3fa4b375..12a2e9b1 100644
--- a/drivers/rilmodem/voicecall.c
+++ b/drivers/rilmodem/voicecall.c
@@ -105,47 +105,6 @@ static void lastcause_cb(struct ril_msg *message, gpointer user_data)
ofono_voicecall_disconnected(vc, reqdata->id, reason, NULL);
}
-static gboolean auto_answer_call(gpointer user_data)
-{
- struct ofono_voicecall *vc = user_data;
-
- DBG("");
-
- ril_answer(vc, NULL, NULL);
-
- return FALSE;
-}
-
-static gboolean is_auto_answer(struct ril_voicecall_data *vd,
- struct ofono_call *call)
-{
- static const char test_mcc_mnc_1[] = "00101";
- static const char test_mcc_mnc_2[] = "001001";
-
- const char *imsi;
- struct ofono_sim *sim;
-
- if (call->status != CALL_STATUS_INCOMING)
- return FALSE;
-
- sim = __ofono_atom_find(OFONO_ATOM_TYPE_SIM, vd->modem);
- if (sim == NULL)
- return FALSE;
-
- imsi = ofono_sim_get_imsi(sim);
- if (imsi == NULL)
- return FALSE;
-
- if (strncmp(imsi, test_mcc_mnc_1, sizeof(test_mcc_mnc_1) - 1) == 0 ||
- strncmp(imsi, test_mcc_mnc_2, sizeof(test_mcc_mnc_2) - 1)
- == 0) {
- ofono_info("Auto answering incoming call, imsi is %s", imsi);
- return TRUE;
- }
-
- return FALSE;
-}
-
static void clcc_poll_cb(struct ril_msg *message, gpointer user_data)
{
struct ofono_voicecall *vc = user_data;
@@ -216,11 +175,6 @@ static void clcc_poll_cb(struct ril_msg *message, gpointer user_data)
vd->cb = NULL;
vd->data = NULL;
}
-
- if (is_auto_answer(vd, nc))
- g_timeout_add_seconds(
- AUTO_ANSWER_DELAY_S,
- auto_answer_call, vc);
}
n = n->next;
diff --git a/drivers/rilmodem/voicecall.h b/drivers/rilmodem/voicecall.h
index 0407abeb..ff952f7e 100644
--- a/drivers/rilmodem/voicecall.h
+++ b/drivers/rilmodem/voicecall.h
@@ -25,7 +25,6 @@ struct ril_voicecall_data {
unsigned int local_release;
unsigned int clcc_source;
GRil *ril;
- struct ofono_modem *modem;
unsigned int vendor;
unsigned char flags;
ofono_voicecall_cb_t cb;