summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Wang <johnwang@google.com>2012-02-24 22:26:34 -0800
committerJohn Wang <johnwang@google.com>2012-02-24 22:26:34 -0800
commit0593c68a986152cd6c21cd92dca43a81c4060fd7 (patch)
treea824492001db301f0b573c528c2fb79d61d699d8
parent5265466e8a5453e738713869f61ca45482b85319 (diff)
downloadframeworks_base-0593c68a986152cd6c21cd92dca43a81c4060fd7.zip
frameworks_base-0593c68a986152cd6c21cd92dca43a81c4060fd7.tar.gz
frameworks_base-0593c68a986152cd6c21cd92dca43a81c4060fd7.tar.bz2
Prevent dial() return null in a racing condition.
The racing condition happens between dial() returns and the first GET_CURRENT_CALLS query gets handled. If GET_CURRENT_CALLS gets handled before dial() finishs, the pendingMO can be set to null in handlePollCalls() so that dial() will return null. This null connection causes error in PhoneUtils.placeCall(). The Synchronized dial() and handlePollCalls() Methods will make sure the dial() returns before the first GET_CURRENT_CALLS gets handled. bug:6028290 Change-Id: I41b024760acb7dd13b342866180dffe3fdbe1c03
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
index 425afe6..b4e0775 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
@@ -167,7 +167,7 @@ public final class GsmCallTracker extends CallTracker {
/**
* clirMode is one of the CLIR_ constants
*/
- Connection
+ synchronized Connection
dial (String dialString, int clirMode, UUSInfo uusInfo) throws CallStateException {
// note that this triggers call state changed notif
clearDisconnected();
@@ -406,7 +406,7 @@ public final class GsmCallTracker extends CallTracker {
}
}
- protected void
+ protected synchronized void
handlePollCalls(AsyncResult ar) {
List polledCalls;