summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorYong Zhang <yzhang@motorola.com>2009-07-24 15:47:34 -0500
committerWink Saville <wink@google.com>2009-07-29 17:01:24 -0700
commit6afac8b2926c166458fde085e6068473a95688fe (patch)
treede6925fbe1ddab16278cb593825bc43f5219b48c /telephony
parent977e67bb5039c7a87968d8ebe72fe410d47544e2 (diff)
downloadframeworks_base-6afac8b2926c166458fde085e6068473a95688fe.zip
frameworks_base-6afac8b2926c166458fde085e6068473a95688fe.tar.gz
frameworks_base-6afac8b2926c166458fde085e6068473a95688fe.tar.bz2
Increase waiting time for data disable action in setPowerStateToDesired().
The issue this change fixes is that phone did not send MIP deregisteration and LCP termination message when user powered down phone while data call was in dormant state. The root cause is Framework Telephony did not wait long enough before it sent the request to power off the radio. The fix is to increase the waiting timer.
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/ServiceStateTracker.java1
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java7
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java2
3 files changed, 6 insertions, 4 deletions
diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
index 8e76cd2..46b39a5 100644
--- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
@@ -77,7 +77,6 @@ public abstract class ServiceStateTracker extends Handler {
// waiting period before recheck gprs and voice registration
public static final int DEFAULT_GPRS_CHECK_PERIOD_MILLIS = 60 * 1000;
- public static final int MAX_NUM_DATA_STATE_READS = 15;
public static final int DATA_STATE_POLL_SLEEP_MS = 100;
//*****GSM events
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index d5da666..b22c80a 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -504,9 +504,10 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
msg.obj = CDMAPhone.REASON_RADIO_TURNED_OFF;
dcTracker.sendMessage(msg);
- // Poll data state up to 15 times, with a 100ms delay
- // totaling 1.5 sec. Normal data disable action will finish in 100ms.
- for (int i = 0; i < MAX_NUM_DATA_STATE_READS; i++) {
+ // Poll data state up to 50 times, with a 100ms delay
+ // totaling 5 sec.
+ // TODO: change the 5 seconds wait from blocking to non-blocking.
+ for (int i = 0; i < 50; i++) {
DataConnectionTracker.State currentState = dcTracker.getState();
if (currentState != DataConnectionTracker.State.CONNECTED
&& currentState != DataConnectionTracker.State.DISCONNECTING) {
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index b3b4345..4178115 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -151,6 +151,8 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
static final int PS_NOTIFICATION = 888; //id to update and cancel PS restricted
static final int CS_NOTIFICATION = 999; //id to update and cancel CS restricted
+ static final int MAX_NUM_DATA_STATE_READS = 15;
+
private ContentObserver mAutoTimeObserver = new ContentObserver(new Handler()) {
@Override
public void onChange(boolean selfChange) {