summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSeth Shelnutt <shelnutt2@gmail.com>2013-06-09 15:45:48 -0400
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-07-01 10:34:36 +0100
commit06dcba0815889f23e2021d788fe6ad00b78d6d4d (patch)
tree2e3df29824fc1525c36ed94be76eb2540c4db76c /src
parent3dba6580fc385399d726233692d5abb3b5b8208b (diff)
downloadframeworks_opt_telephony-06dcba0815889f23e2021d788fe6ad00b78d6d4d.zip
frameworks_opt_telephony-06dcba0815889f23e2021d788fe6ad00b78d6d4d.tar.gz
frameworks_opt_telephony-06dcba0815889f23e2021d788fe6ad00b78d6d4d.tar.bz2
CallTracker: Add back-off and retry toggle to getCurrentCalls
Add a system property to handle cases where the modem reacts slowly and does not update CURRENT_CALLS to include calls which are dialing. A delay is introduced to avoid spamming the modem and then GetCurrentCalls is called again in order to avoid the calltracker from marking the call as ended when it is still active. Tested and LS970 and E970 (Sprint and ATT LG Optimus G). Change-Id: I7d3aac00b811bceb2909adf239492962a737de4a
Diffstat (limited to 'src')
-rw-r--r--src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java12
-rw-r--r--src/java/com/android/internal/telephony/gsm/GsmCallTracker.java12
2 files changed, 24 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java b/src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
index a7d5d0a..196e795 100644
--- a/src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
+++ b/src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
@@ -75,6 +75,10 @@ public final class CdmaCallTracker extends CallTracker {
CdmaConnection pendingMO;
boolean hangupPendingMO;
+
+ //Used to re-request the list of current calls
+ boolean slow_modem = (SystemProperties.getInt("ro.telephony.slow_modem",0) != 0);
+
boolean pendingCallInEcm=false;
boolean mIsInEmergencyCall = false;
CDMAPhone phone;
@@ -496,6 +500,13 @@ public final class CdmaCallTracker extends CallTracker {
boolean needsPollDelay = false;
boolean unknownConnectionAppeared = false;
+ if (slow_modem) {
+ if (polledCalls.size() == 0 && !hangupPendingMO){
+ lastRelevantPoll = obtainMessage(EVENT_POLL_CALLS_RESULT);
+ cm.getCurrentCalls(lastRelevantPoll);
+ return;
+ }
+ }
for (int i = 0, curDC = 0, dcSize = polledCalls.size()
; i < connections.length; i++) {
CdmaConnection conn = connections[i];
@@ -829,6 +840,7 @@ public final class CdmaCallTracker extends CallTracker {
"does not belong to CdmaCallTracker " + this);
}
+ hangupPendingMO = true;
call.onHangupLocal();
phone.notifyPreciseCallStateChanged();
}
diff --git a/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java b/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
index fc7fe8a..c2d1640 100644
--- a/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
+++ b/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
@@ -81,6 +81,9 @@ public final class GsmCallTracker extends CallTracker {
GsmConnection pendingMO;
boolean hangupPendingMO;
+ //Used to re-request the list of current calls
+ boolean slow_modem = (SystemProperties.getInt("ro.telephony.slow_modem",0) != 0);
+
GSMPhone phone;
boolean desiredMute = false; // false = mute off
@@ -432,6 +435,14 @@ public final class GsmCallTracker extends CallTracker {
boolean needsPollDelay = false;
boolean unknownConnectionAppeared = false;
+ if (slow_modem) {
+ if (polledCalls.size() == 0 && !hangupPendingMO){
+ lastRelevantPoll = obtainMessage(EVENT_POLL_CALLS_RESULT);
+ cm.getCurrentCalls(lastRelevantPoll);
+ return;
+ }
+ }
+
for (int i = 0, curDC = 0, dcSize = polledCalls.size()
; i < connections.length; i++) {
GsmConnection conn = connections[i];
@@ -759,6 +770,7 @@ public final class GsmCallTracker extends CallTracker {
"does not belong to GsmCallTracker " + this);
}
+ hangupPendingMO = true;
call.onHangupLocal();
phone.notifyPreciseCallStateChanged();
}