summaryrefslogtreecommitdiffstats
path: root/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/android/internal/telephony/gsm/GsmCallTracker.java')
-rw-r--r--src/java/com/android/internal/telephony/gsm/GsmCallTracker.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java b/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
index 1ebc902..3af3881 100644
--- a/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
+++ b/src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
@@ -432,6 +432,7 @@ public final class GsmCallTracker extends CallTracker {
Connection newRinging = null; //or waiting
boolean hasNonHangupStateChanged = false; // Any change besides
// a dropped connection
+ boolean hasAnyCallDisconnected = false;
boolean needsPollDelay = false;
boolean unknownConnectionAppeared = false;
@@ -595,15 +596,11 @@ public final class GsmCallTracker extends CallTracker {
log("setting cause to " + cause);
}
droppedDuringPoll.remove(i);
- conn.onDisconnect(cause);
- } else if (conn.cause == Connection.DisconnectCause.LOCAL) {
- // Local hangup
+ hasAnyCallDisconnected |= conn.onDisconnect(cause);
+ } else if (conn.cause == Connection.DisconnectCause.LOCAL
+ || conn.cause == Connection.DisconnectCause.INVALID_NUMBER) {
droppedDuringPoll.remove(i);
- conn.onDisconnect(Connection.DisconnectCause.LOCAL);
- } else if (conn.cause ==
- Connection.DisconnectCause.INVALID_NUMBER) {
- droppedDuringPoll.remove(i);
- conn.onDisconnect(Connection.DisconnectCause.INVALID_NUMBER);
+ hasAnyCallDisconnected |= conn.onDisconnect(conn.cause);
}
}
@@ -622,7 +619,7 @@ public final class GsmCallTracker extends CallTracker {
// 1) the phone has started to ring
// 2) A Call/Connection object has changed state...
// we may have switched or held or answered (but not hung up)
- if (newRinging != null || hasNonHangupStateChanged) {
+ if (newRinging != null || hasNonHangupStateChanged || hasAnyCallDisconnected) {
internalClearDisconnected();
}
@@ -632,7 +629,7 @@ public final class GsmCallTracker extends CallTracker {
phone.notifyUnknownConnection();
}
- if (hasNonHangupStateChanged || newRinging != null) {
+ if (hasNonHangupStateChanged || newRinging != null || hasAnyCallDisconnected) {
phone.notifyPreciseCallStateChanged();
}