From 378a4380f21486365bb712dfa69ad974b298b8cb Mon Sep 17 00:00:00 2001 From: Kazuhiro Ondo Date: Sat, 2 Jul 2011 13:34:13 -0500 Subject: Reset FAILED ApnContext state to IDLE on data setup triggers Make sure FAILED ApnContext state is reset to IDLE regarless of existence of the reconnect alarm. This is to let FW re-evaluate call setup conditions properly on data setup triggers. Bug: 4989604 Change-Id: Ia9ec439db1df03bbd2e56803d3558542ba5f5400 --- .../internal/telephony/gsm/GsmDataConnectionTracker.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'telephony') diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java index a6b131a..fe57d0d 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java @@ -608,16 +608,18 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { if (dcac.dataConnection != null) { dcac.dataConnection.resetRetryCount(); } - - Collection apnList = dcac.getApnListSync(); - for (ApnContext apnContext : apnList) { - apnContext.setState(State.IDLE); - } } } // Only check for default APN state for (ApnContext apnContext : mApnContexts.values()) { + if (apnContext.getState() == State.FAILED) { + // By this time, alarms for all failed Apns + // should be stopped if any. + // Make sure to set the state back to IDLE + // so that setup data can happen. + apnContext.setState(State.IDLE); + } if (apnContext.isReady()) { if (apnContext.getState() == State.IDLE) { apnContext.setReason(reason); -- cgit v1.1